I am having trouble looping through the sheets in my workbook and selecting SpecialCells.
When I run this code, it only processes the activesheet.
My first try was
But that just gave me a 'Selection method failure.
I know it is looping through all sheets because I put in a debug.print to give me each sheet name.
I have tried using xlNumbers instead of 23. I have left it blank.
This is a very simple code for demonstration. My actual code is going to process each cell individually depending on further criteria.
Please and Thank You
When I run this code, it only processes the activesheet.
Code:
Sub Testz()
Dim Page As Worksheet
For Each Page In ActiveWorkbook.Worksheets
Selection.SpecialCells(xlCellTypeFormulas, 23).Select
Next
End Sub
My first try was
Code:
Page.SpecialCells(xlCellTypeFormulas, 23).Select
I know it is looping through all sheets because I put in a debug.print to give me each sheet name.
I have tried using xlNumbers instead of 23. I have left it blank.
This is a very simple code for demonstration. My actual code is going to process each cell individually depending on further criteria.
Please and Thank You