I guess the subject line pretty much says it all!! I'm in the process or writing some macros for somebody. how do I select an worksheet by referencing the object name instead of the sheetname. For example sheet1 is called "Phone", so I have
But I want to put Sheet1 in the brackets instead, as the user may want to change the sheet name from something other than phone. I've tried
- ie leaving out the " & " and I've tried
and
but to no avail. how do I do this?
Code:
with Worksheets("Phone")
Code:
with Worksheets(Sheet1)
Code:
with Object(Sheet1)
Code:
with Objects(Sheet1)