View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default How do I create a button to reset ComboBoxs

How about one of these:

Option Explicit
Sub testme04()
Dim myDropDown As DropDown
For Each myDropDown In Worksheets("sheet1").DropDowns
myDropDown.Value = 1
Next myDropDown
End Sub

Sub testme05()
Dim OLEObj As OLEObject
For Each OLEObj In Worksheets("sheet1").OLEObjects
If TypeOf OLEObj.Object Is MSForms.ComboBox Then
OLEObj.Object.ListIndex = 0
End If
Next OLEObj
End Sub

Top one is for Forms and the bottom one for controltoolbox toolbar.

noirnor wrote:

I have Created a Sheet for people to enter specs, and it automatically
Creates, P/N's and Descriptions. Well The people I have created this
for, are not so Bright at times. So there for I want to create a Button
that Reset's all Combo-Box list's back to the top selection.
Basically you have
Colors
Black
Blue
Green.

They select blue, Then when they are finished, they just hit a button
to Select color again.

See I have about 15 Combo Boxs Created, so its hard for them to go back
and select the Original Settings. Well I know that they can just close
the File and open the Original, but They sometimes Save over the top of
that one, so I have to constantly send them the Original.
So this is why I'd like to create a reset Combo-Boxes Button.

I have tried recording macro's, and it does not work with, Control Tool
Box, or Forms.

Anyone have any Suggestions?


--

Dave Peterson