hyperlink subaddress syntax

  • Thread starter Thread starter John A.
  • Start date Start date
J

John A.

I can't seem to get the syntax right to open a named range on an excel
spreadsheet from A2K code when the sheet name has a space in it, as in

Application.FollowHyperlink "\\ts1\_homedirs$\jalexander\myworkbook" ', "[my
sheet]!a1"
gives a 'That name not valid' error in Excel

and

Application.FollowHyperlink "\\ts1\_homedirs$\jalexander\myworkbook" ', "my
sheet!a1"
gives a "Reference not valid" error

and
Application.FollowHyperlink "\\ts1\_homedirs$\jalexander\myworkbook" ',
"mysheet!a1" (no space in 'mysheet')
works fine

Trouble is, there are about 500 workbooks with sheets with spaces in them,
linked to CAD software, etc, not practical to rename.

Any help greatly appreciated.
 
Got it -
Application.FollowHyperlink "\\ts1\_homedirs$\jalexander\myworkbook" ', "'my
sheet'!a1" works
 
Back
Top