• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Disabling A Macro If Another Is Selected

I would like to disable a macro if another is selected. I have buttons in web browsers that all refresh and run at the same time when the page is first opened.


They all refresh because web browsers refresh themselves when first opened.


I would like to deactivate them all at auto_open, and then code each button to run only itself and deactivate the other (to keep them from running at the same time).


What is the code for disabling specific subs?
 
Hi Indi...


Dont take this offensively. It seems like the whole web browser thing inside excel is not good design. You should instead use excel's native features like command buttons (form controls) or drawing shapes to have the buttons and add macros for their onclick events. It is much simpler, more elegant and more secure that way.
 
No offense taken I completely understand where you're coming from (Hui as well).


As for security, I will be the only one privately using this (and offline at that). The button options available to me natively are quite astutely... boring.


In any case, I think the web browser button is a dead end.


That's always been my problem though, I get these ideas and I don't know when to stop in spite of what every sign is telling me.


I gotta say though, if you see these buttons in actions you would be impressed.


I mean I almost had it weren't for the fact that my macros all fire off at once.


If I could've nailed that part down I would've gotten there.


But thanks for all of your help (kudos to Hui as well).
 
Indi


Any picture can be a Button in Excel


About 2 months ago I helped out Jyanguela at

http://chandoo.org/forums/topic/macro-that-copies-a-cell-range-and-pastes-it-on-the-next-empty-row-it-finds


I have attached a chopped down Version of his spreadsheet which only includes the buttons and has all the content and macros removed.

Have a look at http://rapidshare.com/files/427558720/Buttons.xlsx


You will see that correct use of standard buttons together with shading and pictures can do remarkable things
 
Back
Top