Code Speed

Flavoursavor

New Member
Joined
Feb 18, 2009
Messages
7
Hello Everyone,

This may be a pretty simple answer, but I figured I would ask the experts.

I have 7 modulethat each perform an ODBC query on an AS400 database, then return and perform a regex to delete the unnecessary code.

Each of the macros places the data on a seperate sheet, and then I have another module that works through each sheet and formats. ie headers and the such.

My question is, would my code work faster if i had it all within one module, and call each of the subroutines, or to leave it within seperate modules.

Will i achieve any performance enhancements either way?

Thanks
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
IMHO your suggestion would not improve perfomance.

Try turning off calculation and screenupdating first. This usually makes a dramatic difference.

The ODBC query might be a main problem due to variance in server usage/speed. Could try running when everyone has gone home.
 
Upvote 0
Hi Brian,

Thanks for the advice.

I ended up changing the way that the query performs by keeping an open ODBC connection and looping through each of the queries, then going back and performing all of the formatting.

Thanks again!
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,730
Members
448,987
Latest member
marion_davis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top