+ Reply to Thread
Results 1 to 3 of 3

Thread: Removing Selection from Combo Box

  1. #1
    Registered User
    Join Date
    08-19-2004
    Posts
    60

    Removing Selection from Combo Box

    Hi All,

    I have a few combo boxes on a worksheet (from the Forms toolbar) which a user selects data from.

    If the user makes a mistake then there is a Button which runs a macro which should clear the combo boxes out (i.e. leave them blank).

    For some reason the macro to clear out the combo boxes does not appear to be working. It deletes the data in the cell that the combo box is linked to however the combo box entry stays the same.

    Does anyone know how to remove this please?

    Thanks

    James

  2. #2
    Valued Forum Contributor Stuie's Avatar
    Join Date
    09-17-2006
    Location
    Suffolk, UK
    MS-Off Ver
    Excel 2003/2007
    Posts
    432
    Hi jamesryan,

    You need the following peice of code to clear all items from box

    ComboBox1.Clear
    (change ComboBox1 to your combox name)
    There are only 10 types of people in the world:
    Those who understand binary, and those who don't!

  3. #3
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,639
    I generally use the controls from the Controls ToolBox. If you actually need to remove the contents of a Forms ComboBox then use

    'change "Drop Down 1 to suit
       ActiveSheet.Shapes("Drop Down 1").Select
        With Selection
            .ListFillRange = ""
        End With
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

+ 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.2.0