+ Reply to Thread
Results 1 to 3 of 3

combo box user form

  1. #1
    Registered User
    Join Date
    02-20-2012
    Location
    A, A
    MS-Off Ver
    Excel for mac 2011
    Posts
    55

    combo box user form

    Hi Guys and Gals,
    I have created a simple userform with three text boxes and a combo box
    I have mabnaged to get the text boxes to work ok, and now have a drop down list in the combo box but I cannot figure the code to get the information from the combo box on to the spreadsheet with the command button even though i can get the textboxes to work properly code i have used for comand button is


    private sub CommandButton1_Click()
    Worksheets("Sheet1").Activate
    erow = Worksheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
    Cells(erow, 1) = TextBox1.Text
    Cells(erow, 2) = TextBox2.Text
    Cells(erow, 4) = TextBox3.Text

    End Sub

    Thought if I add cells(erow,5)=combobox1.textthis should work, but it seems not
    any help would be gratefully received
    cheers
    Rob
    Last edited by robert.begley1; 11-28-2012 at 02:03 PM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: combo box user form

    Maybe:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: combo box user form

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    HTH
    Regards, Jeff

+ 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