+ Reply to Thread
Results 1 to 3 of 3

Pre fill userform combobox depending on cell selected in worksheet

  1. #1
    Registered User
    Join Date
    03-13-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2010
    Posts
    6

    Pre fill userform combobox depending on cell selected in worksheet

    On my worksheet the userform displays if the user clicks on any cell in the range E3:E56. I would like combobox1 to auto populate on the userform depending on which cell in the range was selected. For example: If the user selected cell E45, the userform displays and combobox1 will auto populate with the value found in cell B45. Is this even possible? Below is the short bit of code I already have that opens the userform if a cell in the range E3:E56 is selected.

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Not Application.Intersect(Target, Range("E3:E56")) Is Nothing Then
    UserForm1.Show
    End If
    End Sub

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Pre fill userform combobox depending on cell selected in worksheet

    In the forms initialise, put me.txtBox1.text = activecell.value

  3. #3
    Registered User
    Join Date
    03-13-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Pre fill userform combobox depending on cell selected in worksheet

    Thank You!

+ 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