| VBA - The Excel Working Partner | |||||||||||||||||||||||||
| Record a Code Sample For Yourself | |||||||||||||||||||||||||
Let's write a program that creates a new customized worksheet automatically to see how this works. I created a background graphic that I want to be used as a background for my new customized worksheet (it's in the file download at the end of the article). I also want to save my customized workbook with a different default name in a specific location. Also, remember to click Yes when Excel asks you whether you want to save the Personal.xls workbook when you close Excel. Now let's examine the VBA program that has been recorded. Select Tools > Macro > Visual Basic Editor and click Module1 under Personal.XLS to display the VBA code window. (You might have to click the View Code button in the upper left corner to display the code. Also note that if you try to edit the VBA program by selecting Macro and then clicking the Edit button, an error message is displayed that tells you that you can't edit a macro on a hidden workbook. Why VBA has these inconsistencies in it is beyond my understanding!)
|
|||||||||||||||||||||||||


