using spaces instead of underscores

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

Hello folks,

Has anyone encountered problems when using spaces in
worksheet names, file names, folder names in excel
programming? I find spaces look neater and improves
readability and I would prefer spaces but thought I would
get some advice prior to beginning to create my folder and
filename structures.

Please note there will be numerous links to external files.

Thanks,

Jason
 
No.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Hi Jason

Just remember that XL encloses the SheetName/[WorkbookName]SheetName element
in single quotes when there are white spaces.

=[Book3.xls]Sheet1!$A$1
='Sheet 2'!$A$1
='[Book3.xls]Sheet 2'!$A$1
='C:\Documents and Settings\Paul Wilson\My Documents\[Book3.xls]Sheet
2'!$A$1

If you create such formulas by code it is always wise to enclose this part
with single quotes

SomeCell.formulaR1C1= "='" & SheetName & "'!R100C100"
SomeCell.formulaR1C1= "='[" & WorkBookName & "]" & SheetName & "'!R100C100"
SomeCell.formulaR1C1= "='Path[" & WorkBookName & "]" & SheetName &
"'!R100C100"

XL will drop them if they are not needed.

Regards

Paul
 
Searching names with spaces can be a pain, can find each
space separated element of the name (but depends on the
find method).

Regards,
Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top