Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default UserForm Loads Slowly

Putting in Doevents does not make the form unload if you used the Hide
command.

--
Regards,
Tom Ogilvy

"Stratuser" wrote in message
...
I think I have found the problem. In the command button that executes some
code on the form, I used the "DoEvents" command after "Me.Hide" (I think I
put that in there a while back to get the form off the screen). But it
may
have caused the form to unload, which is not what I intended, and so the
form
was going through the lengthy initialization sub every time (and then it
has
to look up all those files and repopulate the listboxes). Taking out
"DoEvents" seems to fix the problem by avoiding the initialization sub.

Basically, I only want the initialization sub to run the first time the
form
appears and when I have changed the list of files in a certain
subdirectory.

"Dave Peterson" wrote:

Just some guesses...

Excel uses the windows temporary folder for lots of stuff--including
files that
are required for these controls.

When that folder gets loaded with lots of stuff, excel can get confused.

I'd close excel and clean up that folder.

Close excel
windows start button|Run
%temp%
is a quick way to get to that temporary folder.

Clean up everything you can.

=========
If this problem only occurs on one particular pc (or for one user on that
pc),
it might even solve the problem!

But if it happens for lots of people on lots of pcs, it may not be the
solution.

Depending on what you're doing, maybe just hiding and reshowing would be
a
better that unloading and reloading (if that's what you are doing)????

Stratuser wrote:

I have a userform that has two list boxes, each of which are filled
with
about 100 filenames. Even when I have run this form before and already
have
it loaded with data and the form is just hidden, it takes several
(7-10)
seconds to reappear when I invoke it again. I'm trying to figure out a
way
to speed up the reappearance of the form when I call it again. If I'm
not
adding any data to the listboxes or re-running the filesearch command
that I
used to fill the listboxes, why should it take this long for it to
reappear
when called? Any ideas for speeding it up?


--

Dave Peterson



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
How can I get rid of loads of conditional formatting Ali Adnan Excel Discussion (Misc queries) 1 August 23rd 10 11:54 AM
Workbook only partly loads WoodWorker Excel Discussion (Misc queries) 0 April 26th 07 06:48 PM
Excel loads slow Shane Excel Discussion (Misc queries) 1 October 27th 05 07:15 PM
Loads too slow Heather Excel Discussion (Misc queries) 0 April 12th 05 12:34 PM
Userform List Boxes Load Very Slowly Stratuser Excel Programming 2 September 24th 04 08:24 PM


All times are GMT +1. The time now is 09:37 PM.

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"