Making menu item changes temporary
When I add a custom menu item using the Add method I know
I can make it temporary by setting the Temporary property to True. This is good because I know when my Excel Application Unloads that is it, they don't show up in other workbooks. I need to make some custom changes to Excel Menus (not custom) though like setting the .OnAction property for the "EditDelete Sheet" option to point to my own code. I know how to do this but it affects not only my own application but also all other spreadsheets that are opened. I know I can use the Reset method when I close the application but if for some reason it crashes and the reset is run there is potential for sheets other sheets to be affected and passed around and before you know it.....a mess!! So how can I make the change temporary to begin with? Is it possible? Thanks in advance! RJ |
Making menu item changes temporary
Thanks Dave,
I have looked at that option but if the application crashes for any reason the Reset function never gets a chance to do its work and a possible mess could occur. That is why I wonder if actual property changes could be temporary like the custom options I mentioned. Best Regards, Randy *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Making menu item changes temporary
Couldn't use the application.beforecrash event (or the equivalent windows
API)??? I get it now. I think that my suggestion would be to tell the user that if excel/windows crashed, they should open that workbook and close it. Have your auto_close (workbook_beforeclose) code restore the toolbars. If you gave them a workbook that reset these, then they might use it when you didn't want them to. Maybe if you gave them a nice toolbar with your functions on them, they'd find that more useful and you wouldn't have to even reassign the functions. I don't have any better ideas. Randy wrote: Thanks Dave, I have looked at that option but if the application crashes for any reason the Reset function never gets a chance to do its work and a possible mess could occur. That is why I wonder if actual property changes could be temporary like the custom options I mentioned. Best Regards, Randy *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! -- Dave Peterson |
All times are GMT +1. The time now is 09:47 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com