Maybe this:
UserForm1.Hide
UserForm2.Show
'etc.
Or this:
Unload UserForm1
'etc.
This will clear all TextBoxes on a Form:
Private Sub cmdNew_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''.
"sam" wrote:
> Hi all,
>
> I have designed an excel form with Three buttons Cancle, Clear and Submit
>
> The issue: When I input the data and click Cancle button, The form still
> populates the excel sheet with inputs in radio buttons and checkboxes but not
> the text box inputs. The code for my cancle button is
>
> Private Sub Cancel_Click()
> Unload Me
> End Sub
>
> Shouldnt it unload data from all the fields?
>
> Please HELP
>
> Thanks in Advance.
|