Locking other Excel sheets from intermingling with my Excel App
Randy -
Prevent other workbooks from running your code by inserting a line like this around your event procedures: If ActiveWorkbook.Name = ThisWorkbook.Name Then ' run the code End If You could also use an application event class module to show particular custom commandbar buttons when your workbook is activated, and hide them when your book is deactivated. These things will let your workbook coexist peacefully with anyone else's. - Jon ------- Jon Peltier, Microsoft Excel MVP http://www.geocities.com/jonpeltier/Excel/index.html _______ Randy wrote: When users open my Excel Application all is ok until they open another sheet. A few things happen: 1) The new sheet shares the active window of my Excel App. 2) Sometimes based on the event the new sheet calls macros in my application. I know I could use Application.IgnoreRemoteRequests=True to eliminate this completely but if that value is not set before the app closes it creates a mess will any Excel sheets the user may wish to open. Not good if a system crash occurs. So therefore not an option. What other options do I have? I have been trying all kinds of things. You would think Excel would have something that would Make an application a true and separate application...... Any ideas? Thanks! |
Locking other Excel sheets from intermingling with my Excel App
Jon,
Thanks very much for your input on my issue. Sorry it has taken so long to get back. I have still not been able to try your suggestions, that will be next week but they make sense. I will let you know how it goes. Best Regards, Randy *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
All times are GMT +1. The time now is 04:34 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com