ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Speeding up Macro (https://www.excelbanter.com/excel-programming/374359-speeding-up-macro.html)

jayklmno

Speeding up Macro
 
I have a complex macro that moves a preformatted sheet and brings in a large
amount of data from a database and starts processing it. Based on the data,
it then inserts a line in the form in the appropriate section (items in the
data may not be in order). This inserting and the subsequent actions are very
very slow. Almost to a crawl and working with 300 lines of data to insert
into the sheet pushes the report past the 20 minute mark.

Any general advice to speed this up? All the basic stuff is covered.
Calculation is off, error checking is off, page breaks are off, scren draw is
off. I've optimiazed everything I know. Why does the insert take so long to
do?

Any advice would be great.

Don Guillett

Speeding up Macro
 
hard to give advice without seeing the code.

--
Don Guillett
SalesAid Software

"jayklmno" wrote in message
...
I have a complex macro that moves a preformatted sheet and brings in a
large
amount of data from a database and starts processing it. Based on the
data,
it then inserts a line in the form in the appropriate section (items in
the
data may not be in order). This inserting and the subsequent actions are
very
very slow. Almost to a crawl and working with 300 lines of data to insert
into the sheet pushes the report past the 20 minute mark.

Any general advice to speed this up? All the basic stuff is covered.
Calculation is off, error checking is off, page breaks are off, scren draw
is
off. I've optimiazed everything I know. Why does the insert take so long
to
do?

Any advice would be great.




Alok

Speeding up Macro
 
If there are worksheet change events then you may want to switch of events.

Alok

"jayklmno" wrote:

I have a complex macro that moves a preformatted sheet and brings in a large
amount of data from a database and starts processing it. Based on the data,
it then inserts a line in the form in the appropriate section (items in the
data may not be in order). This inserting and the subsequent actions are very
very slow. Almost to a crawl and working with 300 lines of data to insert
into the sheet pushes the report past the 20 minute mark.

Any general advice to speed this up? All the basic stuff is covered.
Calculation is off, error checking is off, page breaks are off, scren draw is
off. I've optimiazed everything I know. Why does the insert take so long to
do?

Any advice would be great.


Halim

Speeding up Macro
 
Hi,

Working with excel object is slower than you use
Variable declaration to store the data,,, or using
txt file is faster ...
--

Regards,

Halim


"jayklmno" wrote:

I have a complex macro that moves a preformatted sheet and brings in a large
amount of data from a database and starts processing it. Based on the data,
it then inserts a line in the form in the appropriate section (items in the
data may not be in order). This inserting and the subsequent actions are very
very slow. Almost to a crawl and working with 300 lines of data to insert
into the sheet pushes the report past the 20 minute mark.

Any general advice to speed this up? All the basic stuff is covered.
Calculation is off, error checking is off, page breaks are off, scren draw is
off. I've optimiazed everything I know. Why does the insert take so long to
do?

Any advice would be great.


JNW

Speeding up Macro
 
Why don't you import everything and then sort?
--
JNW


"jayklmno" wrote:

I have a complex macro that moves a preformatted sheet and brings in a large
amount of data from a database and starts processing it. Based on the data,
it then inserts a line in the form in the appropriate section (items in the
data may not be in order). This inserting and the subsequent actions are very
very slow. Almost to a crawl and working with 300 lines of data to insert
into the sheet pushes the report past the 20 minute mark.

Any general advice to speed this up? All the basic stuff is covered.
Calculation is off, error checking is off, page breaks are off, scren draw is
off. I've optimiazed everything I know. Why does the insert take so long to
do?

Any advice would be great.



All times are GMT +1. The time now is 10:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com