This issue as far as I'm concerned goes all the way back to Excel 97 at
least when VBA was first introduced to Excel. We use a vendor for pulling
data from our database system and take the data into Excel. With me being
one of 2 far advanced MS Office users and VBA programmers within the
division, I not only link the queries to Excel via the third party tool, but
also use the various events setup in it. Anyhow, the vendor has specified
that for any workbook with queries linked to it, The workbook name can not
have a single space in it. However, you can use the underscore (_) in place
of the space to get around this issue.
When I am linking a procedure to an event of the vendor, it has to be in the
format of:
WorkbookName.xls!ModuleName.ProcedureName
When you think about it, can any module and/or procedure name have a single
space in it?
Obviously no as spaces have a lot of other significations in the coding
world. For this reason, I can see why spaces don't work as it would be the
same as if you would be attempting to use the function of CallByName, and
it's procname argument can't contain any spaces in it either (True, the help
file doesn't state that, but have you ever seen a procedure or object name
contain a space within it's code name?) In this case, it's using the
workbook name as if it's a code name for the workbook.
--
Thanks,
Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000