PDA

View Full Version : Solved: ActiveSheet question



ulfal028
07-20-2006, 02:29 AM
Hi,
I'm using a single userform (showmodal = false) on various sheets. What I'm looking for is to specify the active sheet as a parameter and then refer to this parameter for certain tasks.

Sort of:
Dim X As Long
X = ThisWorkbook.ActiveSheet

Sheets("Test").Range("AB22").Copy _
Destination:=Sheets(X).Range("F2")


I'd also like to specify an active cell this way, appreciate some help.

ALe
07-20-2006, 02:47 AM
Dim X as String
X=Thisworkbook.Activesheet.name

Sheets("Test").Range("AB22").Copy _
Destination:=Sheets(X).Range("F2")

ulfal028
07-20-2006, 03:19 AM
How did I miss that.... thanks anyway.

ALe
07-20-2006, 03:43 AM
it always happens to me too. :banghead:

:thumb