PC Review


Reply
Thread Tools Rate Thread

How do I create a Reset Button on a form created in Excel

 
 
SadiesMom
Guest
Posts: n/a
 
      24th Nov 2008
I am using Excel 2003 and have set up a form for people to fill out on their
computers, print off and then send to the appropriate department.
I want to incorporate a RESET button for the user in case they make a
mistake filling it out.
I can't write a macro to undo because there are option buttons in the form
and they won't undo. I thought about having the file close and re-open, but
have been unsuccessful in being able to write a macro to do such a task.
I have no VBA experience. Anyone knowing of a good resourse from me to
learn VBA as well as an answer for the "reset" situation is greatly
appreciated.

 
Reply With Quote
 
 
 
 
Susan
Guest
Posts: n/a
 
      24th Nov 2008
if you have a userform_initialize routine that sets up the userform -
makes all the option button values false, clears the textboxes, etc.,
you can use that.

'--------------------------------------------------
Private Sub cmdReset_click()

Call userform_initialize

end sub
'----------------------------------------------------

otherwise you've got to do it inside the cmdReset sub.
something like:

'---------------------------------------------------
Private Sub cmdReset_click()

with Me
.optionbutton1.value = false
.optionbutton2.value = false
.optionbutton3.value = false
.textbox1.value = ""
.textbox2.value = ""
'etc whatever controls you've got
End With

End Sub
'-------------------------------------------------

hope that helps get you started!

susan


On Nov 24, 3:43*pm, SadiesMom <Sadies...@discussions.microsoft.com>
wrote:
> I am using Excel 2003 and have set up a form for people to fill out on their
> computers, print off and then send to the appropriate department. *
> I want to incorporate a RESET button for the user in case they make a
> mistake filling it out. *
> I can't write a macro to undo because there are option buttons in the form
> and they won't undo. * I thought about having the file close and re-open, but
> have been unsuccessful in being able to write a macro to do such a task.
> I have no VBA experience. * Anyone knowing of a good resourse from me to
> learn VBA as well as an answer for the "reset" situation is greatly
> appreciated.


 
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
reset ALL checkboxes (created with control toolbar) with the click of ONE BUTTON kpeschel@earthlink.net Microsoft Excel Programming 1 7th Jul 2007 07:27 PM
Create reset from field button without unprotecting =?Utf-8?B?U3RldmU=?= Microsoft Word Document Management 8 2nd Apr 2007 07:34 PM
Want to create a reset password button on a form =?Utf-8?B?Sm9uYXRoYW4gQnJvd24=?= Microsoft Access Form Coding 6 25th Oct 2006 10:58 PM
reset button, create excel, import table, send e-mail, create back-up matthew nance Microsoft Access 0 27th Jul 2004 06:52 PM
How do I create a button to reset ComboBoxs noirnor Microsoft Excel Programming 5 10th Sep 2003 01:55 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:50 AM.