Sheet name

  • Thread starter Thread starter oldjay
  • Start date Start date
O

oldjay

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

MyConstant = Application.CountA(Sheets("Master").Range("A2:I31"))
 
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
 
Replace Sheets("Master") with ActiveSheet
eg.
MyConstant = Application.CountA(activesheet.Range("A2:I31"))
 
Back
Top