+ Reply to Thread
Results 1 to 3 of 3

VBA Select between 2 macros.

  1. #1
    Registered User
    Join Date
    12-27-2016
    Location
    Switzerland
    MS-Off Ver
    2010, Office 365
    Posts
    26

    VBA Select between 2 macros.

    Hi, im new to VBA. How can I do a popup, which asks what macro i want to run. I want the two possibilities in 1 macro like this:

    Sub Test()

    blabla

    If user selects macro 1, Do this code:
    blabla

    If user selects macro 2, Do this code:
    blahblah

    End Sub

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: VBA Select between 2 macros.

    Hi,

    This code will run the macro named at the input box prompt
    Please Login or Register  to view this content.
    eg., if the text "Macro1" is entered, the subroutine Macro1() will be called.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA Select between 2 macros.

    Maybe:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] How to select a particular cell using macros?
    By aadeshgandhi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-06-2013, 01:58 PM
  2. Getting macros to Select next column automaticaly
    By phillb in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-26-2011, 05:01 AM
  3. Macros -How to autofill to end and select all
    By RikkeB in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-09-2009, 01:09 PM
  4. How to minimise .Select in Macros?
    By MichielEngineer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-10-2008, 07:56 AM
  5. Can't Select Macros From Tools Menu
    By modytrane in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-23-2008, 08:35 AM
  6. How to select different Macros from a dropdown list?
    By globulous in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-04-2007, 12:16 AM
  7. Select from multiple macros
    By aswert1223 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-21-2005, 04:54 PM
  8. [SOLVED] how do i select different printer trays using macros
    By Mannis in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-06-2005, 12:06 PM

Tags for this Thread

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