clicking cancle button still populates radio buttons, check box in

S

sam

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.
 
R

ryguy7272

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---
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top