+ Reply to Thread
Results 1 to 5 of 5

How to fill List in Combo Box from Design

  1. #1
    Resant
    Guest

    How to fill List in Combo Box from Design

    Hi all,
    I want to entry some list to combo box from design, something like :
    Sunday, Monday, etc.
    But I cannot find 'List' property, like I found it in Visual Basic.

    Please help me to solve this problem.

    Thanks,

    Resant


  2. #2

    Re: How to fill List in Combo Box from Design

    where is your combo box stored - is it on a custom form, or directly on
    a worksheet. If on the worksheet, did it come from the forms toolbar
    or the controls toolbar?


  3. #3
    Tom Ogilvy
    Guest

    RE: How to fill List in Combo Box from Design

    For a Userform:

    Private Sub UserForm_Initialize()
    v = Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
    "Saturday")
    ComboBox1.List = v
    End Sub

    On the worksheet

    Sub ABC()
    v = Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday",
    "Saturday")
    With ActiveSheet
    ' control toolbox combobox
    .ComboBox1.List = v
    ' forms toolbar dropdown
    .DropDowns("Drop Down 2").List = v
    End With

    End Sub


    Incell dropdown (Data Validation)

    Sub AddValidation()
    Dim rng As Range
    Set rng1 = Range("C9")
    With rng1.Validation
    .Delete
    .Add Type:=xlValidateList, _
    AlertStyle:=xlValidAlertStop, _
    Operator:=xlBetween, _
    Formula1:= _
    "Sunday, Monday, Tuesday, " & _
    "Wednesday, Thursday, Friday, " & _
    "Saturday"
    .IgnoreBlank = True
    .InCellDropdown = True
    .InputTitle = ""
    .ErrorTitle = ""
    .InputMessage = ""
    .ErrorMessage = ""
    .ShowInput = True
    .ShowError = True
    End With
    End Sub

    --
    Regards,
    Tom Ogilvy



    "Resant" wrote:

    > Hi all,
    > I want to entry some list to combo box from design, something like :
    > Sunday, Monday, etc.
    > But I cannot find 'List' property, like I found it in Visual Basic.
    >
    > Please help me to solve this problem.
    >
    > Thanks,
    >
    > Resant
    >
    >


  4. #4
    Resant
    Guest

    Re: How to fill List in Combo Box from Design

    I create combo box in a worksheet, using Control Toolbox.
    I don't want to fill the list from macro, but from the properties
    directly, just like VB.
    Is it possible?

    Thanks,
    Resant


  5. #5

    Re: How to fill List in Combo Box from Design

    You can use the ListFill range property to set the data from the
    worksheet, but there isn't a LIST item as in VB.


+ 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