Reports generator and performance design

Jgiordano

New Member
Joined
Nov 22, 2013
Messages
8
Hi everybody !

I'm opening this thread because i need some help to make one of my application work better. I'm not new to VBA but i have no formation on programming and performance design. I'm pretty sure some of you have come across this type of questions and performance problem. Maybe you could give me some hint on the design. So here is the case :

My application import a table in a sheet than contain 400+ cost centers and information about it that i use to build a report. Those reports need to be grouped by cost center director (70) and saved in a distinct workbook (later emailed to them but it's a different process).

Here is how my the report creation process works:
1. Loop in a named range to create the 70 temporary workbooks and store it in a dictionary
2. On the report sheet, there is a single cell to change (the cost center number) and it change the whole report. So i loop by changing this cell based on a named range containing cost center number.
3. For every cost center number, make a copy using the .rows method (because i need to keep different rows height) on the clipboard then
4. Loop through the dictionary/workbooks to find the corresponding workbook, create a new sheet and paste.
5. Some copy/paste for shape or other object not pasted in #4
6. At the end, loop again in dictionary/workbooks and save each of them.

Everything works fine, except that for steps #2, #3, #4 , it takes more than a hour to process...

Note : I tried this with the same performance results : Create a temporary workbook, loop and create 400+ sheets/reports in it, loop through newly created sheet and copy (copy sheet method) the sheet with same director in a new workbook and save. Very long to process again.

Hope one of you have some ideas or something i should read to improve my coding.
Thanks,
 

Some videos you may like

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Watch MrExcel Video

Forum statistics

Threads
1,109,030
Messages
5,526,344
Members
409,697
Latest member
christopherlewis1620

This Week's Hot Topics

Top