Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub CommandButton1_Click()
dim cntrl as MSForms.Control For Each cntrl in Userform2.Controls if typeof cntrl is MSForms.Combobox then cntrl.Listindex = -1 end if Next end sub -- Regards, Tom Ogilvy "Profairy " wrote in message ... Hi Tom, Could you give me a quick example of how what to put in my new sub to set all cbo boxes to -1 so far i've done dim cbo as Combobox For Each cbo in Userform2 if cbo.value = 0 then cbo.value = -1 end if Next end sub this doesn't work... i'm just guessing really as i'm still very new to excel vba. Thanks helen x ;) --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Getting Combo boxes to change options based on other Combo boxes. | New Users to Excel | |||
How to clear a group of combo boxes after a submit to another worksheet | Excel Discussion (Misc queries) | |||
Clear a set of combo boxes after a Submit of data to a new sheet. | Excel Worksheet Functions | |||
Problem Adding new Combo Boxes | Excel Discussion (Misc queries) | |||
combo boxes on a form | Excel Discussion (Misc queries) |