|
-
July 2nd, 2001, 06:43 AM
#1
Speed up VB
Hello!
I am developing a COM Add-In for Excel. Now I have the following problem. I write around 2000 lines with 20 columns of data (most are references to another sheet) to an excel worksheet. I cannot write the whole data set at one time. Impossible (too long to explain for now). The problem is that the more data is on the sheet the longer it takes to create new lines. At the end it takes nearly a minute to create the data.
How can I speed this up? Any ideas?
Thank you in advance for your help!
--------------------------------------------------
Visit our new forum: www.maxcode.com
Feel free to contact me via ICQ# 82806695
-
July 2nd, 2001, 06:52 AM
#2
Re: Speed up VB
Do you have derived cells on the sheet? i.e. running totals or averages or whatever - if so, add these after the data set has been populated.
-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com
-
July 2nd, 2001, 06:55 AM
#3
Re: Speed up VB
No...
Its the following: I have one sheet with languages (4 columns) one column contains the current language and if another language is selected this columns is filled with one of the other columns contents... follow?
And on the other sheet there are cells which refer to the current language column in the other sheet.
Understand what I am talking about?
--------------------------------------------------
Visit our new forum: www.maxcode.com
Feel free to contact me via ICQ# 82806695
-
July 2nd, 2001, 07:00 AM
#4
Re: Speed up VB
I think that is a redraw problem. The excel window is redrawn every time a line is inserted into the sheet. Can I prevent redrawing until my generating process is finished?
--------------------------------------------------
Visit our new forum: www.maxcode.com
Feel free to contact me via ICQ# 82806695
-
July 2nd, 2001, 07:01 AM
#5
Re: Speed up VB
Try setting the EnableCalculation property of the sheet to false, insert all your rows, and set it back to true. Then call the Calculate method of the sheet.
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|