clicking cancle button still populates radio buttons, check box in

clicking cancle button still populates radio buttons, check box in

Post by c2Ft » Tue, 07 Jul 2009 23:28:01


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.

 
 
 

clicking cancle button still populates radio buttons, check box in

Post by cnlndXk3Mj » Tue, 07 Jul 2009 23:40:07


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