+ Reply to Thread
Results 1 to 8 of 8

clearing a dropdown menu

  1. #1
    Forum Contributor
    Join Date
    01-06-2007
    Posts
    103

    clearing a dropdown menu

    hi

    can anyone help me with the following?

    i have dropdown menu in a form and i would like it to be cleared everytime the form is opened...i am sure i have done this before in the properties of the combobox in vba

    thanks!

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by northernstar197
    hi

    can anyone help me with the following?

    i have dropdown menu in a form and i would like it to be cleared everytime the form is opened...i am sure i have done this before in the properties of the combobox in vba

    thanks!
    hi

    if this is a ListBox then

    ListBox2.Clear

    would do that.

    hth
    ---
    Si fractum non sit, noli id reficere.

  3. #3
    Forum Contributor
    Join Date
    01-06-2007
    Posts
    103
    it is a combobox called Employee2

    the code you suggested didnt work

    any other ideas would be appreciated

    thanks

  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by northernstar197
    it is a combobox called Employee2

    the code you suggested didnt work

    any other ideas would be appreciated

    thanks
    Hi,

    'combobox' is such a loose term in Excel, was this created under Control Toolbox, or under Forms ?

    ---

  5. #5
    Forum Contributor
    Join Date
    01-06-2007
    Posts
    103
    it is created within a form

    hope this helps

    thanks

  6. #6
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by northernstar197
    it is created within a form

    hope this helps

    thanks
    Probably, which I did check, and the system calls it a 'dropdown' box as per your first post (but a combobox on the menu to create it).

    If you Rightmouse the box and Format Control, you should see the range that forms the dropdown list,
    for my ActiveSheet.Shapes("Drop Down 3").Select the list was at B5 to B10

    Clearing those cells should work for you, as you intialize the form, then

    Range("B5:B10").Value = ""

    should do the trick. (set to your cells of course)

    Let me know how you go.

    ---

  7. #7
    Forum Contributor
    Join Date
    01-06-2007
    Posts
    103
    but i still want the cells to have the employee names in them to save the using typing them in....so if i clear them out then wont they be lost?

    or am i a misunderstanding what you are saying?

    thanks

  8. #8
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by northernstar197
    but i still want the cells to have the employee names in them to save the using typing them in....so if i clear them out then wont they be lost?

    or am i a misunderstanding what you are saying?

    thanks
    one of us is misunderstanding, it looks like me.

    You have a combobox from the Forms menu, (aka DropDown).

    If you rightmouse this box the options include

    Input Range
    Cell link
    Drop Down Lines

    Are you looking to clear the contents of the Cell link, or the contents of the data range that is Input Range (the displayed dropdown)


    If you just want to clear the cell that was selected, then something like
    Please Login or Register  to view this content.
    works for me

    ---
    Last edited by Bryan Hessey; 01-12-2007 at 01:04 AM.

+ 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