View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
carlo carlo is offline
external usenet poster
 
Posts: 367
Default Option box for running a macro

You could use a Messagebox (Msgbox) for that.
But you only have predefined buttons for that like:
yes no
yes no cancel
ok
ok cancel

and so on.

if this is what you are looking for, use:
dim Answer_Msgbox as Variant

Answer_Msgbox = Msgbox "your Question", vbyesno, "your title"

if Answer_Msgbox = vbyes then
'your Macro1
else
'your Macro2
end if


if you don't like that, you could still make a userform, that looks
like a msgbox and you can put your macros directly on the buttons.

hth

Carlo



On Nov 27, 1:16 pm, Ant wrote:
I have 2 macros which I would like to combine into one. Basically I would
like the user to start the macro (push a button) and a window/balloon or
something will pop up with the choice of option 1 or option 2. Choosing
option 1 will run macro 1 and choosing option 2 will run macro 2.

Thanks in advance.