PC Review


Reply
Thread Tools Rate Thread

clicking cancle button still populates radio buttons, check box in

 
 
sam
Guest
Posts: n/a
 
      6th Jul 2009

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.
 
Reply With Quote
 
 
 
 
ryguy7272
Guest
Posts: n/a
 
      6th Jul 2009

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.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET Reset Radio Button in a group of Radio Buttons Scott D Johnson Microsoft ASP .NET 1 27th Sep 2006 11:38 PM
check boxes as radio buttons =?Utf-8?B?cm9zZQ==?= Microsoft Word Document Management 2 26th Oct 2005 07:54 PM
Check Boxes used as Radio Buttons =?Utf-8?B?QkMyMDA0?= Microsoft Outlook Installation 0 16th Dec 2004 08:03 PM
VBA: Disable Frame and Radio Buttons based on Another Radio Button Being True Mcasteel Microsoft Excel Worksheet Functions 2 29th Oct 2004 07:06 PM
Check boxes and radio buttons =?Utf-8?B?bF9hbmRyb21lZGFfbA==?= Microsoft Word Document Management 0 21st Oct 2004 05:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:37 AM.