Results 1 to 3 of 3

Thread: Excel - how do (or can) I assign a macro to each drop-down item?

  1. #1
    Registered User
    Join Date
    Jun 2005
    Posts
    13
    Thanks
    0
    Thanked
    0 times in 0 posts

    Excel - how do (or can) I assign a macro to each drop-down item?

    I need a little help with Excel - is it possible to assign a macro to each item in a drop-down list? I would have thought M$ would have thought of a linear way to so ....or maybe not

    Thanks

  2. #2
    Hexus.net Troll Dougal's Avatar
    Join Date
    Jun 2005
    Location
    In your eyeball.
    Posts
    2,750
    Thanks
    0
    Thanked
    0 times in 0 posts
    I know that in Access you can use vba to make a little script along the lines of:

    lstBox_ChangeOption()

    'code

    end sub#

    Shuld b able to do a similar thing in Excel IIRC

    **EDIT***

    Soz, then use

    Select Case lstBox
    Quote Originally Posted by Errr...me
    I MSN offline people
    6014 3DMk 05

  3. #3
    Registered User
    Join Date
    Jun 2005
    Posts
    13
    Thanks
    0
    Thanked
    0 times in 0 posts
    Sorry, I'm totally crap with Visual Basic should I have something like this?:


    Sub Larder2()
    '
    Select Case lstBox("Larder Prep")
    Sheets("Larder Prep").Select
    Select Case 2ndBox("Bakery")
    Sheets("Bakery").Select
    End Sub

    To try and make myself clearer, I'm trying to create a worksheet to catalogue food supplies, with each spreadsheet containing information on each type of food. On the main spreadsheet I've created a few text boxes for data entry and a command button to copy them to a spreadsheet. I need to be able to select the food type from the drop-down list so that it can go to a specified sheet.
    Last edited by jbp20717; 01-07-2005 at 03:22 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Patch 1.4 Released
    By ERU in forum PC
    Replies: 60
    Last Post: 26-11-2006, 05:43 PM

Posting Permissions

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