Consulting

Results 1 to 6 of 6

Thread: Solved: Custom Prompt box w/ multiple buttons

  1. #1
    VBAX Regular
    Joined
    Jun 2009
    Posts
    79
    Location

    Solved: Custom Prompt box w/ multiple buttons

    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!

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    See attached for a suggestion.
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  3. #3
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    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.

  4. #4
    VBAX Regular
    Joined
    Jun 2009
    Posts
    79
    Location
    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?

  5. #5
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    [VBA]With ActiveSheet
    .Shapes(1).Visible = Not(.Shapes(1).Visible)
    ' similar
    End With[/VBA]

  6. #6
    VBAX Regular
    Joined
    Jun 2009
    Posts
    79
    Location
    Nice, thanks for your input.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •