Thread: Sheet CodeNames
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Sheet CodeNames

That will fail if there are single quotes in the sheet name. Better for the
OP to use what I posted in the event there are single quotes in the sheet
name, which need to be delimited.

Cheers
-

"Bill Renaud" wrote in message
. ..
ActivateCell.FormulaR1C1 = "='" & MainPage.Name & "'!R10C22"

MainPage refers to the worksheet (code name) as you requested, and the
".Name" part is the property that returns the tab name (what the user
sees at the bottom of the worksheet). Be sure to include single quotes
around the sheet name, in case the sheet name has spaces in it. (Note
the single quote to the right of the second "=" and just to the left of
the "!".)
--
Regards,
Bill Renaud