Manipulate Excel

  • Thread starter Thread starter Bich Leu
  • Start date Start date
B

Bich Leu

Hello. I create alot of spreadsheets. Whenever one is nearly done, I add
some additional code and forms to the spreadsheet. The same code/forms are
added to each spreadsheet. I was wondering if there was a way I could
automate this. I pretty much want to create some code that will actually
create code in the spreadsheet's VBA environment. Is it possible to do
something like this in VBA or even VB 6? I know you can do it in VB 6 for
that environment. I just haven't been able to figure it our for Excel.

TIA,
Bich Leu
 
You'll want to save your code/forms into a single XLA file.
Then you can load that xla file with any number of XLS
files and have access to the code/forms of the single
XLA. This way you can manage your code from one source.
When you save-as XLA, Excel will try to force your XLA
file to the Add-in directory but it can actually be saved
and loaded from a network drive without a problem. One
note of caution...make sure the xla file is read-only to
regular users or else they will blow it up and you may
want to add protection to it to prevent them from looking
at the code depending on how paranoid you are...like me.
-Kevin
 
the easiest thing to do is save it into your persanal
macro book. (when you record macro it asks you where you
what it) Once you did that, you should be able to use code
and forms for any file without putting code in each file.

Tahnks
 
Back
Top