+ Reply to Thread
Results 1 to 4 of 4

clear data bound combobox when userform is shown

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    05-12-2009
    Location
    Hendersonville, TN
    MS-Off Ver
    Excel 2010
    Posts
    113

    clear data bound combobox when userform is shown

    Hi all,

    Been running myself in circles with this. It seems a no-brainer but I can't seem to get it to work out. I have a userform with a contol box. When I click the control it will hide the userform and show another. Simply put, I want the shown userform to have its only combobox (Combobox1) clear itself of previously entered data. I have the combobox tied to a named range from which I can make a selection. I have tried variations along the line of Combobox1.clear, Combobox1.text.clear, Combobox1.value ="" and so on.

    Please help.

    Thank you,

    Patrick

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: clear data bound combobox when userform is shown

    Hi Patrick

    You can try this
    Private Sub UserForm_Activate()
        Me.ComboBox1.ListIndex = -1
    End Sub
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Forum Contributor
    Join Date
    05-12-2009
    Location
    Hendersonville, TN
    MS-Off Ver
    Excel 2010
    Posts
    113

    Re: clear data bound combobox when userform is shown

    Worked like a charm. Thank you very much.

    Patrick

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: clear data bound combobox when userform is shown

    You're welcome...glad I could help. Thanks for the Rep.

+ 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. Userform - selecting data for combobox 2 basedon slection in combobox 1
    By chrisjames25 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-17-2013, 04:27 PM
  2. [SOLVED] send data from userform combobox to userform combobox
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-18-2013, 04:47 PM
  3. Refer to bound column in Userform combo box
    By coasterman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2012, 05:48 PM
  4. [SOLVED] Bound Combo box in userform
    By Jennifer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-16-2006, 04:10 AM
  5. Userform to enter values and shown in same userform in list
    By helmekki in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-19-2005, 11:23 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