Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    Terneuzen, Netherlands
    Posts
    895
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have a user form with some drop-downs on it (combo-box). The entries in the dropdown come from a range in Excel. The code is (now) in UserForm.Activate and has lines like:

    With MSMS_Form.ComboStatus
    For i = 1 To Range("LStat").Rows.Count
    .AddItem Range("LStat").Cells(i, 1)
    Next
    End With

    Every time I call the form, I want the drop-downs refreshed from the Excel range. It now seems as if each time I call the form the entries are added at the bottom (so the previous ones remain and are not cleared). How do I do that (without removing all in a loop; isn't there a "reset" possibility that clears all the entries??)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    The Clear method of the combo box clears the combo box.

  3. #3
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    Terneuzen, Netherlands
    Posts
    895
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='768138' date='29-Mar-2009 21:44']The Clear method of the combo box clears the combo box.[/quote]

    That's the first thing I tried; when it didn't seem to work, I posted here

    Tried it again and of course it works... I must have messed up before... sorry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •