+ Reply to Thread
Results 1 to 4 of 4

Using LISTBOX to choose from several macros

  1. #1
    Forum Contributor
    Join Date
    05-04-2015
    Location
    Atlanta GA
    MS-Off Ver
    2010
    Posts
    106

    Using LISTBOX to choose from several macros

    I would like to use a LISTBOX to choose from about 10 different macros but I don't want the box macro to have the whole IF/Then text...you know, if cells(2, 4) = 1 then and so on.

    Can't I just use a string variable to tell it which macro to use?
    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Using LISTBOX to choose from several macros

    Try something like this...


    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    05-04-2015
    Location
    Atlanta GA
    MS-Off Ver
    2010
    Posts
    106

    Re: Using LISTBOX to choose from several macros

    I get an error. It's looking for something in here:

    Select Case ListBox1.ListIndex

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Using LISTBOX to choose from several macros

    I'll need a lot more details.
    • What was the error number and description?
    • Is your listbox named ListBox1?
    • Is the list box on a worksheet or in a UserForm?
    • Where did you put the code?

+ 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] Help - Choose a option in listbox then uptades another form
    By rssmith93 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-11-2016, 12:51 PM
  2. [SOLVED] Call 2 macros with listbox change
    By Sideshow1447 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-19-2015, 04:17 PM
  3. macros to allow me to choose what files i want in same folder?
    By taimysho0 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2014, 08:10 PM
  4. Macros to find all matches and put in a userform to choose best match
    By lottidotti in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-17-2012, 12:51 PM
  5. choose either listbox or both to populate eserform
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-07-2012, 08:49 PM
  6. Can I choose 12 macros with only one button?
    By rookie37 in forum Excel General
    Replies: 3
    Last Post: 06-19-2010, 02:16 AM
  7. choose default macros Not Enabled / Macros Enable Setting
    By BEEJAY in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-30-2006, 08:10 AM

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