Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default help!! reset a form

How do you reset a form after macros have run? I have a macro that deletes
all lines that have a 0 in column C after data has been pulled in from other
sheets. I need to add a button that will restore the form to it's original
state.

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default help!! reset a form

If you mean useform, then you need to put in code that resets each control
individually.

Easier it to unload the form and then show it again. Don't do that from the
code in the form itself however. handle that in the code that shows the
form.

Public bshowform as boolean

Sub Main()
bshowform = True
do while bshowform
userform1.show
Loop
End Sub

in the userform code

Private Sub cmdClose_click()
bShowForm = False
unload me
End Sub

Private Sub cmdExecute_click()
' code that works on your sheet
bshowform = True
unload me
End Sub

--
Regards,
Tom Ogilvy



--
Regards,
Tom Ogilvy


"pywhacket" wrote:

How do you reset a form after macros have run? I have a macro that deletes
all lines that have a 0 in column C after data has been pulled in from other
sheets. I need to add a button that will restore the form to it's original
state.

Thanks!

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
Macro to Reset data input form MichaelRobert Excel Worksheet Functions 5 September 18th 09 02:55 PM
How do I reset the tab key? Saeanen Excel Discussion (Misc queries) 2 May 22nd 07 04:26 PM
How do I reset the tab order in a form Lyne Excel Worksheet Functions 5 February 12th 07 01:36 PM
how to reset form pywhacket Excel Worksheet Functions 1 March 17th 06 02:54 PM
checkbox on form reset from checkbox on sheet raw[_12_] Excel Programming 1 December 3rd 05 05:08 AM


All times are GMT +1. The time now is 07:38 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"