Archive of Mr Excel Message Board
Back to Excel VBA archive index
Back to archive home
clear text box valuesPosted by jeff on July 18, 2001 8:32 AM
Is it possible to clear text box values in a form? I am trying to clear the values to reuse a userform. The first time it works, but when i try to reuse it, the old values that were entered come in again. Any ideas?
Thanks in advance
|Check out our Excel VBA Resources
Re: clear text box valuesPosted by Cory on July 18, 2001 9:13 AM
I wish I knew what code you were using to clear the values the first time. Have you tried unloading the form then reloading it? That usually clears all values.
Private Sub CommandButton1_Click()
Re: clear text box valuesPosted by jeff on July 18, 2001 9:27 AM
Re: clear text box valuesPosted by Ivan F Moala on July 18, 2001 7:49 PM
Private Sub ClearCtrls()
Dim FrmsCtrl As MSForms.Control
For Each FrmsCtrl In Me.Controls
If TypeName(FrmsCtrl) = "TextBox" Then
FrmsCtrl.Text = ""
This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our online store
to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.