LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 618
Default there must be a better way - ensuring userforms are closed

Hi All

i have code that should unload a userform when it has finished running the
code associated with it, but i've found that it doesn't always do it .. so i
would like on the initialization of the "menu" userform to ensure that all
other userforms are closed e.g.

on error resume next
unload userform1
unload userform2

etc

however, i've noticed that when stepping through this code the form
initialization code runs for each of the userforms whether or not they are
displayed - which slows down the code somewhat.

i know that i can check to see if a userform is visible, and if it is to
close it
e.g.

if userform1.visible = true then
unload userform1
end if
if userform2.visible = true then
unload userform2
end if

but i'm wondering if there is a more efficient way of doing this. (Excel
2000 btw)

Cheers
JulieD


 
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
Ensuring Correct Vin Number is entered Rocko Excel Discussion (Misc queries) 2 July 2nd 09 07:55 AM
Ensuring a Cell in Print Preview DOES Print Bob Barnes Excel Discussion (Misc queries) 2 June 29th 09 09:26 PM
Ensuring input is rounded up to nearest 10 RayC Excel Discussion (Misc queries) 6 November 25th 07 06:31 PM
Ensuring 3 cells do NOT match GIdunno Excel Discussion (Misc queries) 12 September 6th 07 09:36 PM
Ensuring deleted data cannot be recovered Jell Excel Discussion (Misc queries) 3 July 3rd 05 03:11 PM


All times are GMT +1. The time now is 01:55 AM.

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

About Us

"It's about Microsoft Excel"