View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pantera Pantera is offline
external usenet poster
 
Posts: 4
Default Active sheet instead of a "sheet1" for Macro

On Dec 31, 10:10*am, JE McGimpsey wrote:
One way:

* *If ActiveSheet.Range("A1").Value = True Then
* * * * *ActiveSheet.Range("C11:C7").Copy
* *End If

Or, equivalently:

* *With ActiveSheet
* * * If .Range("A1").Value = True Then .Range("C11:C17").Copy
* *End With

In article
,



*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- Hide quoted text -


- Show quoted text -


Thank you!!! works like a charm.
Pamela