View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Die_Another_Day Die_Another_Day is offline
external usenet poster
 
Posts: 644
Default How do I prevent unintentionally running a Macro?

If MsgBox("Macro1 Is about to launch. Continue?", vbYesNo) = vbNo Then
Exit Sub

Charles Chickering

UA_Jeremy wrote:
So, I find myself accidentally running macros. I have about 20 setup on my
laptop. this usually occurs when I'm using the keyboard with 'ctrl'. Since,
you can't undo a macro this is a big problem for me.

So, I want to add some code to my macros that will make a messabe box pop-up
and ask me if I want to run the macro. If, I select 'yes' then the macro runs
as normal; if 'no', then the macro ends.

Can anyone help?