+ Reply to Thread
Results 1 to 2 of 2

ComboBox Selection to a Cell

Hybrid View

  1. #1
    Registered User
    Join Date
    07-18-2009
    Location
    MODESTO,USA
    MS-Off Ver
    Excel 2007
    Posts
    53

    ComboBox Selection to a Cell

    Hello,

    Can someone help me to figure out how to place the selected value on my Userform "UserForm_CustomerSelection" into Cell B5.

    The value selection is made out of a ComboBox called "ComboBox-CustomerSelection".

    
    Sub EstimateTemplate()
        ClearContents
        CustomerSelection
    End Sub
    Sub ClearContents()
    'Clears Customer Data
        With Range("Customer_Name,Customer_Address,Customer_Phones,Company_Contact") _
        .ClearContents
    'Clears Project Data
        With Range("Project_Name,Project_Address,Project_City") _
        .ClearContents
        End With
        End With
    End Sub
    Sub CustomerSelection()
        UserForm_CustomerSelection.Show
    End Sub
    Last edited by CESAR V. ARROYO; 03-01-2012 at 02:19 PM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: ComboBox Selection to a Cell

    Hi,

    You could either use the ControlSource property of the combobox and enter B15, or better still name the B15 cell and use the name in the ControlSource property instead.

    Alternatively explicitly enter the combobox value to B15 with a combobox event, e.g. the Change event. i.e.

    Sheet1.Range("B15") = UserForm_CustomerSelection.ComboBox-CustomerSelection
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ 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