Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See if this works for you:
Sub test() Dim ctl As MSForms.Control For Each ctl In Form1.Controls Select Case TypeName(ctl) Case "TextBox" MainForm.Controls(ctl.Name).Text = vbNullString Case "CheckBox" MainForm.Controls(ctl.Name).Value = False Case "OptionButton" MainForm.Controls(ctl.Name).Value = False End Select Next ctl End Sub RBS "WLMPilot" wrote in message ... Is there an easy way to clear all fields in a userform (textboxes and comboboxes)? I have about 26 fields of text or combo boxes and wanted to see if there is just a command to "clear" userform. Thanks, Les |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Clearing fields when differnt function selected | Excel Worksheet Functions | |||
Pivot table clearing phantom page fields | Excel Programming | |||
Clearing associated dropdown fields | Excel Worksheet Functions | |||
clearing unlocked fields on a protected sheet | Excel Programming | |||
Clearing a userform | Excel Programming |