Refer to original sheet

al23
04-04-2003, 12:22 PM
I have an excel sheet where I run my vba program from. That program adds several new sheets. I need to refer back to the original sheet. Is there a way to do this? I don't want to use the name of the sheet because this program will be run from several different sheets.
Thanks

Wamphyri
04-04-2003, 12:36 PM
Declare an Excel.Worksheet and Set it to your original worksheet.

Dim xlSH as Excel.WorkSheet
'Before adding any other sheets
Set xlSH = Application.ActiveSheet
'Now you can refer to your original sheet my using
xlSh.Whatever

al23
04-04-2003, 12:46 PM
Thank you very much.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum