+ Reply to Thread
Results 1 to 4 of 4

Popup Q/A Box when Macro starts

  1. #1
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Popup Q/A Box when Macro starts

    Hi all,

    I would like to have a question box pop up w/Yes and No Buttons at the start of my macro to choose between two different sub routines.

    Therefore,

    MsgBox would say: Import New Yard Inventory?
    If Yes,
    then it would run the alternate subroutine.
    If No, Then it would run macros normal routine.

    Not quite sure how to do this. Would the msg box have to be a form box
    where, a representive value would have to get filled into a cell? Then
    reference if cell value is true ,then

    or would it register the value to memory so then, the code would have to
    to call the given value then run code if value it true?

    I hope even with my lack of correct terminology, that my description is sufficient to convey my problem.

    Thanks,

    bdb
    Last edited by bdb1974; 03-27-2009 at 02:33 PM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Popup Q/A Box when Macro starts

    Hi BDB,

    You could use something like the following to determine which routine to run:
    Please Login or Register  to view this content.
    Clicking Yes to the message box triggers macro1, while clicking No triggers macro2. Clicking Cancel ends the code altogether.

    Hope that helps!

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Popup Q/A Box when Macro starts

    Something like this:
    Please Login or Register  to view this content.
    Insert your macros into the colored sections.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Popup Q/A Box when Macro starts

    Great!

    Thanks Guys, both work.

    Thanks for the options.


    BDB

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1