+ Reply to Thread
Results 1 to 3 of 3

MsgBox/ListBox/ComboBox

Hybrid View

  1. #1
    Registered User
    Join Date
    11-15-2007
    Posts
    11

    MsgBox/ListBox/ComboBox

    Hi, I am currently writing some vb code in excel.

    I am at a stage where I want a messagebox to appear with a list of criteria to choose. I only have two criteria ("Profit Centre", "Business Area"). Then depending on what is chosen, the code works accordingly.

    Can anyone help?

    Thanks

  2. #2
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    You need either a ListBox or a ComboBox a MsgBox will only do want you want by using an If statement for each of the buttons you select the messagebox to have. Just look at ListBox in the VBA help!
    Not all forums are the same - seek and you shall find

  3. #3
    Forum Contributor
    Join Date
    01-21-2005
    Location
    Colorado
    MS-Off Ver
    2000,2003,2007
    Posts
    481
    You will need to use a userform with either a listbox or combobox on the userform.

    If your list will always contain only the two choices you mentioned then you could also use option buttons on the userform and an OK button. After a selection is made and the OK button pressed the corresponding code could run.

    Think about what style the selection option should take and let us know if you have any further questions.

    HTH

+ 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