View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Active sheet instead of a "sheet1" for Macro

If Activesheet.range("a1").value = True Then



Pantera wrote:

I have this code in a macro:
If Sheets("Sheet1").[A1] = True Then
ActiveWindow.SmallScroll Down:=-9
Application.Goto Reference:="R17C3"
Range("C11:C17").Select
Range("C17").Activate
Selection.Copy

My questions is how do I make this macro work in any worksheet not
only only in sheet1, what do i have to change from "Sheet1" to make it
work.
thank you,

Pamela


--

Dave Peterson