+ Reply to Thread
Results 1 to 2 of 2

Thread: How to add drop down list in userform

  1. #1
    Registered User
    Join Date
    08-12-2010
    Location
    Mumbai
    MS-Off Ver
    Excel 2007
    Posts
    12

    How to add drop down list in userform

    Hi,
    I am making a macro enabled excel sheet. In this sheet I am creating a user form which contains a dropdown list. The problem is that the data that I want in the dropdown list is arranged in horizontal. I want the user to select the grade of concrete in the user form drop down list the source of which is saved in sheet 2 (C1:H1) I could do it in selecting grade of steel as the data was arranged in vertical. When I input rowsource as "sheet2!C1:H1, in the property box Combobox2, I can only see M15 getting selected. I dont get a drop down list.
    Please let me know if requires any special coding.
    Thank you.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    888

    Re: How to add drop down list in userform

    Try this in the "Userform Initialize" Event:-
    Private Sub UserForm_Initialize()
    With Me.ComboBox1
    .RowSource = ""
    .List = Application.Transpose(Sheets("Sheet2").Range("C1:H1").value)
    End With
    End Sub

+ 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.2.0