Sheet name

O

oldjay

I want to change this from the Master sheet to the active sheet

MyConstant = Application.CountA(Sheets("Master").Range("A2:I31"))
 
L

Lars-Åke Aspelin

I want to change this from the Master sheet to the active sheet

MyConstant = Application.CountA(Sheets("Master").Range("A2:I31"))


Try this:

MyConstant = Application.CountA(ActiveSheet.Range("A2:I31"))

Hope this helps/ Lars-Åke
 
R

Rob van Gelder

Replace Sheets("Master") with ActiveSheet
eg.
MyConstant = Application.CountA(activesheet.Range("A2:I31"))
 
Top