Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default UserForm - pointing control source to new sheet - long delay

Tony Miller brought next idea :
Thanks for your assistance Gary
In the end I revisited my loops and managed to trim them down which
improved the load speed by 50%
The form was getting unloaded before the new sheet was set so
it didnt seem to be the issue
It still was something weird as using a msgbox would ameliroate the
situation


Thanks for the feedback!
As I stated in my previous post, how you go about it will affect
performance. Obviously your rework cleanup addressed that and has set
you further ahead.

Why the MsgBox behaves the way it does is because it forces a screen
repaint/refresh so it will display. What you may find, though, is that
what you see only applies to the visible part of the userform when the
msgbox displays.

FWIW
I've found I get the best performance using many controls by loading
the values from a wks by 'dumping' them into an array and processing
that rather than using ControlSource. It's no secret that VBA is
inherently slow when doing read/write to many cells. Processing data in
memory via arrays is orders of magnitude faster and more efficient. The
data can also be 'dumped' back into the wks in one step.

That said, it makes a good reason to design spreadsheets that process
large amounts of data to facilitate using memory instead of read/write
the sheet directly. Optionally, I'll store the values in a delimited
text file and dump that into an array. Of course, it depends on what
the project requires but it's always going to result in better
performance to NOT read/write many cells directly if avoidable!

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


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
Pointing to a new data source Cameron Excel Programming 3 June 14th 07 05:35 PM
File-Open Long Delay John Excel Discussion (Misc queries) 3 May 5th 06 04:15 PM
Long Time Delay To Paste From UserForm To Sheet Minitman Excel Worksheet Functions 7 December 6th 05 12:30 AM
Control Source on UserForm Richard Excel Programming 1 May 17th 04 01:27 PM
Query on Control Source in Userform Textbox golf4 Excel Programming 4 February 18th 04 02:27 AM


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