Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Anyway, I tried your suggestion and it seems to work! However, I figured
out that I also have to make sure that the names of the Excel Files don't contain a "-", because then the code you suggested doesn't work (the AUTO_OPEN macro is not found). Where workbook names include dash's, spaces and some other characters, for many operations the name needs to be embraced with apostrophes. Working with Tom's code, try changing the line: Application.Run mybook.Name & "!Auto_Open" to Application.Run Chr(39) & mybook.Name & "'!Auto_Open" It won't do any harm to include the apostrophes even if not required. Regards, Peter T "BuZzzy FF" wrote in message ... Hello Tom, It seems our messages crossed somehow (I'm sorry, it's probably me being completely new on this kind of discussion forums...) Anyway, I tried your suggestion and it seems to work! However, I figured out that I also have to make sure that the names of the Excel Files don't contain a "-", because then the code you suggested doesn't work (the AUTO_OPEN macro is not found). Conclusion: I have 2 solutions for the problem now: 1) Use the object method like Mr. Naik suggested and use the RunAutoMacros xlAutoOpen statement like I did originally, but insert also dummy calls since apparently only the 1st, 3th, 5th etc... call are succesful (the others are just skipped) 2) Use the Object Method like Mr. Ogilvy suggested, but make sure that the file names of the Excel files don't contain a "-". Thanks for your help! kind regards, Filip Henderieckx *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to run Multiple Macro's in Worksheet? | Excel Discussion (Misc queries) | |||
Hide Macro's in Toolbar / Macro's list | Excel Discussion (Misc queries) | |||
macro's problem | Excel Discussion (Misc queries) | |||
How do you assign macro's to new menu with buttons on Auto_open? | Excel Programming | |||
How do you assign macro's to new menu with buttons on Auto_open? | Excel Programming |