O
Otto Moehrbach
Excel XP & Win XP
This is very simple but I can't quite hit it.
I have a variable workbook set to the variable "wbCMP". That workbook has
only one sheet and the sheet name is variable. That workbook is NOT the
active workbook. I want to refer to that single sheet in a With .../End
With construct, as in:
With wbCMP.Sheet1
'Copy/paste data
End With
I tried .Sheets(Sheet1)
..Sheets(Sheet(1))
..Sheet(1)
to no avail.
What is the proper syntax to refer to that lone sheet? Thanks for your
time. Otto
This is very simple but I can't quite hit it.
I have a variable workbook set to the variable "wbCMP". That workbook has
only one sheet and the sheet name is variable. That workbook is NOT the
active workbook. I want to refer to that single sheet in a With .../End
With construct, as in:
With wbCMP.Sheet1
'Copy/paste data
End With
I tried .Sheets(Sheet1)
..Sheets(Sheet(1))
..Sheet(1)
to no avail.
What is the proper syntax to refer to that lone sheet? Thanks for your
time. Otto