Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clearing trext box values
Hi,
is there a way to clear all the etxtboxes in a form (something like fmTest.AllTextBoxes.Clear) rather than having to list them individually? TIA Dave |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clearing trext box values
There's always a way...
Private Sub cmdNewPT_Click() Dim C As MSForms.Control For Each C In Me.Controls If TypeOf C Is MSForms.TextBox Then C.Text = "" End If Next C End Sub HTH, Ryan--- -- Ryan--- If this information was helpful, please indicate this by clicking ''Yes''. "Risky Dave" wrote: Hi, is there a way to clear all the etxtboxes in a form (something like fmTest.AllTextBoxes.Clear) rather than having to list them individually? TIA Dave |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clearing trext box values
Assuming fmTest is a UserForm, give this code a try...
Dim C As Object For Each C In Me.Controls If TypeName(C) = "TextBox" Then C.Text = "" Next -- Rick (MVP - Excel) "Risky Dave" wrote in message ... Hi, is there a way to clear all the etxtboxes in a form (something like fmTest.AllTextBoxes.Clear) rather than having to list them individually? TIA Dave |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clearing trext box values
Both,
Many thanks "Risky Dave" wrote: Hi, is there a way to clear all the etxtboxes in a form (something like fmTest.AllTextBoxes.Clear) rather than having to list them individually? TIA Dave |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
clearing duplicate values in Column A | Excel Programming | |||
Clearing all values in range that aren't formulas | Excel Programming | |||
Clearing the Values in a Drop - Down List | Excel Programming | |||
Clearing Form Values the easy Way??? | Excel Programming | |||
vba clearing out values stored in array | Excel Programming |