Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clearing of textboxes
Good Day Group,
Have before from this group received help with clearing of many TextBoxes in a Userform with the below code. Is it possible to modify this code to except one or two TextBoxes from being cleared? Brgds CG Rosén ------------------------------------------------------------- For Each Ctl In UserForm1.Controls Select Case LCase(TypeName(Ctl)) Case "textbox" Ctl.Text = vbNullString End Select Next ------------------------------------------------------------- |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clearing of textboxes
Hi
Dim ctrl As Variant For Each ctrl In UserForm1.Controls If TypeOf ctrl Is MSForms.TextBox Then If Not ctrl.Name = "TextBox6" And _ Not ctrl.Name = "TextBox3" Then _ ctrl.Text = vbNullString End If Next ctrl -- XL2003 Regards William "CG Rosén" wrote in message ... Good Day Group, Have before from this group received help with clearing of many TextBoxes in a Userform with the below code. Is it possible to modify this code to except one or two TextBoxes from being cleared? Brgds CG Rosén ------------------------------------------------------------- For Each Ctl In UserForm1.Controls Select Case LCase(TypeName(Ctl)) Case "textbox" Ctl.Text = vbNullString End Select Next ------------------------------------------------------------- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Clearing cells without clearing formulas | Excel Discussion (Misc queries) | |||
Textboxes | Excel Discussion (Misc queries) | |||
Clearing text in TextBoxes | Excel Programming | |||
intermittent problem with clearing textboxes on forms | Excel Programming | |||
Clearing TextBoxes needs 2 clicks | Excel Programming |