Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default clicking cancle button still populates radio buttons, check box in


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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default clicking cancle button still populates radio buttons, check box in


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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reset button code for Radio Buttons [email protected] Excel Discussion (Misc queries) 6 August 25th 12 03:09 PM
how do I add either a radio button or check box to an Excel doc? ORD_AVG_GUY Excel Discussion (Misc queries) 2 February 1st 09 06:30 AM
Radio buttons, check boxes in Excel 2007 smartgal Excel Discussion (Misc queries) 4 November 11th 08 06:52 PM
Can you create a check box or radio button in Excel? sf49ers Excel Discussion (Misc queries) 2 January 5th 05 03:31 PM
VBA: Disable Frame and Radio Buttons based on Another Radio Button Being True Mcasteel Excel Worksheet Functions 2 October 29th 04 07:06 PM


All times are GMT +1. The time now is 11:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"