Is there any documentation, white papers, guidelines, or discussions on code optimization?
I've been working hard to develop a series of Excel and Word Macros to generate an order form. In the almost final step, I have created a Word macro that steps through rows of a table that were populated via a mailmerge from Excel.
The Macro essentially formats each row depending on a 'tag' field. Depending on the value of the tag, any particular row could have the cells joined, a header style applied, and/or possibly have the row shaded.
In executing the macro, I am finding that even on a 2Ghz computer, if the table is several thousand rows long, the time to complete the task can be measured in hours.
Other than turning off screen updating, what else can you do to make sure your code is as efficient as possible?
I've been working hard to develop a series of Excel and Word Macros to generate an order form. In the almost final step, I have created a Word macro that steps through rows of a table that were populated via a mailmerge from Excel.
The Macro essentially formats each row depending on a 'tag' field. Depending on the value of the tag, any particular row could have the cells joined, a header style applied, and/or possibly have the row shaded.
In executing the macro, I am finding that even on a 2Ghz computer, if the table is several thousand rows long, the time to complete the task can be measured in hours.
Other than turning off screen updating, what else can you do to make sure your code is as efficient as possible?