LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Problem with multiple Auto_Open Macro's

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to run Multiple Macro's in Worksheet? Ben Dummar Excel Discussion (Misc queries) 6 May 25th 06 05:16 AM
Hide Macro's in Toolbar / Macro's list sparx Excel Discussion (Misc queries) 2 May 6th 06 08:53 PM
macro's problem gerry405 Excel Discussion (Misc queries) 7 October 31st 05 01:16 PM
How do you assign macro's to new menu with buttons on Auto_open? Simon Lloyd[_514_] Excel Programming 6 June 27th 04 12:14 PM
How do you assign macro's to new menu with buttons on Auto_open? Simon Lloyd[_502_] Excel Programming 2 June 23rd 04 11:19 PM


All times are GMT +1. The time now is 11:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"