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
 
Try this...

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top