+ Reply to Thread
Results 1 to 5 of 5

Drop Down Menu

  1. #1
    Registered User
    Join Date
    01-31-2006
    Posts
    20

    Question Drop Down Menu

    How do you create a drop down menu in VBA

    example a menu with the following options

    Black
    Red
    Green

  2. #2
    Bob Phillips
    Guest

    Re: Drop Down Menu

    Goto menu Data>Validation, set Allow to List, and enter the values as comma
    delimited list

    --

    HTH

    Bob Phillips

    (remove nothere from the email address if mailing direct)

    "cedtech23" <[email protected]> wrote in
    message news:[email protected]...
    >
    > How do you create a drop down menu in VBA
    >
    > example a menu with the following options
    >
    > Black
    > Red
    > Green
    >
    >
    > --
    > cedtech23
    > ------------------------------------------------------------------------
    > cedtech23's Profile:

    http://www.excelforum.com/member.php...o&userid=31022
    > View this thread: http://www.excelforum.com/showthread...hreadid=506963
    >




  3. #3
    Registered User
    Join Date
    01-31-2006
    Posts
    20
    thank you for the response... I really wanted to know how to do that in the VBA enviroment with a form. sorry I was not clear

  4. #4
    Bob Phillips
    Guest

    Re: Drop Down Menu

    With Userform.Listbox1
    .AddItem "Black"
    .AddItem "Red"
    .AddItem "Green"
    End With

    or

    With Userform.Combobox1
    .AddItem "Black"
    .AddItem "Red"
    .AddItem "Green"
    End With

    --

    HTH

    Bob Phillips

    (remove nothere from the email address if mailing direct)

    "cedtech23" <[email protected]> wrote
    in message news:[email protected]...
    >
    > thank you for the response... I really wanted to know how to do that in
    > the VBA enviroment with a form. sorry I was not clear
    >
    >
    > --
    > cedtech23
    > ------------------------------------------------------------------------
    > cedtech23's Profile:

    http://www.excelforum.com/member.php...o&userid=31022
    > View this thread: http://www.excelforum.com/showthread...hreadid=506963
    >




  5. #5
    L. Howard Kittle
    Guest

    Re: Drop Down Menu

    From the macro recorded:

    Sub Macro12()

    With Selection.Validation
    .Delete
    .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=
    _
    xlBetween, Formula1:="=$A$1:$A$3"
    .IgnoreBlank = True
    .InCellDropdown = True
    .InputTitle = ""
    .ErrorTitle = ""
    .InputMessage = ""
    .ErrorMessage = ""
    .ShowInput = True
    .ShowError = True
    End With
    End Sub

    HTH
    Regards,
    Howard

    "cedtech23" <[email protected]> wrote in
    message news:[email protected]...
    >
    > How do you create a drop down menu in VBA
    >
    > example a menu with the following options
    >
    > Black
    > Red
    > Green
    >
    >
    > --
    > cedtech23
    > ------------------------------------------------------------------------
    > cedtech23's Profile:
    > http://www.excelforum.com/member.php...o&userid=31022
    > View this thread: http://www.excelforum.com/showthread...hreadid=506963
    >




+ 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