Thread: Sheet name
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Lars-Åke Aspelin[_2_] Lars-Åke Aspelin[_2_] is offline
external usenet poster
 
Posts: 913
Default Sheet name

On Sat, 12 Dec 2009 12:08:01 -0800, oldjay
wrote:


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