+ Reply to Thread
Results 1 to 3 of 3

macro to blank combo box selection

  1. #1
    Registered User
    Join Date
    12-15-2005
    Posts
    42

    macro to blank combo box selection

    I have 63 combo boxes on a worksheet. Each one has a name associated with it ("Pick1" ... thru .... "Pick63"). Each combo box has 3 drop down lines where the #1 selection of each is a blank selection.
    I want to write a macro that will in effect select the "blank" (#1) selection of each combo box. I am not familiar with code regarding combo boxes.
    Thanks in advance for your help!

  2. #2
    Forum Contributor
    Join Date
    08-02-2007
    Location
    Panama & Austria
    MS-Off Ver
    2003 & 2010
    Posts
    186
    Is your combobox directly in the worksheet or you have it in a Form?
    If you indeed have it in the worksheet, I would suggest that you configure the cell to manage a list.
    To do so, select a cell, then in the menu select Data -> Validation. In there, select the "List" Option. As source, you could use a range of cells (each cell value will be an option in the drop box).
    In this approach, if you want all 63 to be "Blank", you just need to write a macro with Range("A1:A63").Clearcontents and they will all be blank.(concidering your drop boxes are in cell A1 to A63) .

    Hope it helps.

  3. #3
    Registered User
    Join Date
    12-15-2005
    Posts
    42

    Thumbs up This works fine!

    Thanks Wizz,
    The combo boxes are spread out on the worksheet and there are items that I do not want to clear.
    I did not have the cell managing a list but the [Range("A1").clearcontents"]command does empty the cell like I want, therefore I will be able to use this to manage all of the combo boxes.
    Many thanks for your help!

+ 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