View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default One macro two versions

Hi Shatin

Look in the VBA help for application.caller if you use forms buttons


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Shatin" wrote in message ...
I have a macro which is normally invoked by a button on a worksheet. Before
the macro is run, there is a MsgBox prompt asking for confirmation.

Now I want to call this macro from another macro. In this case, I want to
skip the MsgBox prompt part and go ahead with the macro right away.

How can I check whether the macro has been called by a button or another
macro? Or is there a better way handling this problem?

TIA