Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pointing to a new data source | Excel Programming | |||
File-Open Long Delay | Excel Discussion (Misc queries) | |||
Long Time Delay To Paste From UserForm To Sheet | Excel Worksheet Functions | |||
Control Source on UserForm | Excel Programming | |||
Query on Control Source in Userform Textbox | Excel Programming |