+ Reply to Thread
Results 1 to 2 of 2

Populate Cell on Combobox Selection

Hybrid View

flindy87 Populate Cell on Combobox... 07-30-2013, 07:58 AM
Norie Re: Populate Cell on Combobox... 07-30-2013, 08:03 AM
  1. #1
    Registered User
    Join Date
    05-28-2013
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    45

    Populate Cell on Combobox Selection

    Hi,

    I am trying to get a cell to populate based on what is selected on a combobox for a userform.

    Private Sub UserForm_Initialize()
        With Worksheets("Lookup")
            ComboBox1.List = .Range("b12:b" & .Range("b" & .Rows.Count).End(xlUp).Row).Value
           
        End With
        
        Sheets("Controlpage").Range("h28").Value = ComboBox1.Value
        
    End Sub
    This is the code i have, the combobox populates correctly but the value of the selection will not display on my worksheet.

    Any idea why?

    Thanks

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: Populate Cell on Combobox Selection

    Put the code to populate the cell in the combobox's Change event.
    Private Sub ComboBox1_Change
          Sheets("Controlpage").Range("h28").Value = ComboBox1.Value
    End Sub
    If posting code please use code tags, see here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Automatically Populate Listbox from ComboBox Selection
    By doglover in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-21-2013, 01:51 AM
  2. [SOLVED] How do I make a selection from a combobox on my VBA userform populate a textbox?
    By ChristianMba in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-16-2012, 01:08 PM
  3. Populate several TextBoxes from a ComboBox selection
    By D3Pratt in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-31-2009, 12:19 PM
  4. Populate a activeX combobox from a selection of another combobox
    By ptramel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-28-2009, 06:50 PM
  5. [SOLVED] How do i populate a text box according to selection in combobox?
    By Steve in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-13-2006, 07:45 AM

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