PDA

View Full Version : Solved: Custom Prompt box w/ multiple buttons



rob0923
08-16-2009, 10:47 AM
Hi,

Maybe a general question and I am not sure if this is more of a plane VB question. I have a macro that will have three different macros and need to break them up. I would prefer not to have three buttons in the excel workbook. What I want to do is create one button that will prompt a box with 3 buttons (options) to run which macro.

If this is possible would there also be a way to add custom graphics to this msg box? Or would I need to this is VB and intergrate it into the VBA.

Thanks in advance!

p45cal
08-16-2009, 11:03 AM
See attached for a suggestion.

mikerickson
08-16-2009, 11:20 AM
Any shape (including images) can have a macro assigned to them.
You could create 3 shapes, assign them to your 3 macros.

Then the "master" button could toggle the visibility of those shapes.

rob0923
08-16-2009, 12:08 PM
Thanks for the quick responses!

pc45cal, That is exactly what I was looking for!

Mikerickson, that sounds interesting too, would you write a macro to toggle the visibility to true?

mikerickson
08-16-2009, 12:58 PM
With ActiveSheet
.Shapes(1).Visible = Not(.Shapes(1).Visible)
' similar
End With

rob0923
08-16-2009, 04:11 PM
Nice, thanks for your input.