Friday, January 14, 2011

Let's Do Some House-Cleaning Part II: More parameters to throw around

We will assume that all the Excel files are saved or created under the folder:

C:\Sales

Now I know that I should be doing a better job organizing my files, but it's very convenient to assume a single folder structure for demonstration purpose. Wherever applicable, you should change the default path shown here to your own specific settings.

Furthermore, remember the sales org file that you could download in the last post - "Mikoudai Inc Sales Hierarchy.xls"? Throughout this blog we will use this file as our Macro file - meaning we write Macros within this file and use such Macros to control other files. Instead of directly writing VBA codes in the output files, this method offers several advantages:

1), No one can peek into your codes as they are not in the output files;
2), We have ready access to the sales org hierarchy (including all the territory #, etc) which is necessary for just about every Macro we are going to write.
3). Scalability. This "Macro file" is not task-specific so change some parameters and we are good to go for our next task.

No comments:

Post a Comment