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

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default UserForm Loads Slowly

What code do you have in the Userform Initialize and Userform Activate
events? Also do you have objects stored in frames on the userform? I've
had issues with frames causing extremely slow performance if not called
correctly.

Charles

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?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default UserForm Loads Slowly



"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?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default UserForm Loads Slowly

There are no frames on the userform. And when the form is activated, the
code just resets some of the checkboxes. The filesearch procedure that fills
the two listboxes happens during the initialization only. That's why I
can't figure out what's taking so long when all I'm doing is reactivating the
userform.

"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?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default UserForm Loads Slowly

Put a break point on the command to re-activate the userform, then
single step through until you find the command that zaps all the time.

Charles Chickering

Stratuser wrote:
There are no frames on the userform. And when the form is activated, the
code just resets some of the checkboxes. The filesearch procedure that fills
the two listboxes happens during the initialization only. That's why I
can't figure out what's taking so long when all I'm doing is reactivating the
userform.

"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?




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default UserForm Loads Slowly

Okay, when I "show" the userform, the initialization sub is running, and that
what's taking the time. Now I need to figure out why it's initializing,
instead of just activating.

"Die_Another_Day" wrote:

Put a break point on the command to re-activate the userform, then
single step through until you find the command that zaps all the time.

Charles Chickering

Stratuser wrote:
There are no frames on the userform. And when the form is activated, the
code just resets some of the checkboxes. The filesearch procedure that fills
the two listboxes happens during the initialization only. That's why I
can't figure out what's taking so long when all I'm doing is reactivating the
userform.

"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?



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default UserForm Loads Slowly

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
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default UserForm Loads Slowly

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

  #9   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:34 AM.

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"