View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Application.Run correct syntax

Yes you need to embrace workbook names with apostrophes if they include
certain characters such as a space and various others. Similarly in formulas
and elsewhere. No harm to include them if not needed so best always to
include them.

Regards,
Peter T

"Antonio" wrote in message
...
I think I found the reason.

Spaces in a workbook name require the name be
enclosed in single quotes.

My workbook name was actually a S.xls not aS.xls

Is this correct?

"Antonio" wrote:

Application.Run "'a S.xls'!send_email_confirm"
Application.Run "a S.xls!send_email_confirm"

The first works, the second does not.

According to the help files I need parenthesis.
According to this forum the second one should be the correct one.

Clarification would be helpful.

Thanks,

Antonio