Macro's particular to a Workbook

  • Thread starter Thread starter Bob Featherstone
  • Start date Start date
B

Bob Featherstone

I have a series of workbooks which perform accounting functions split into
monthly worksheets and an invoice tracker. I have generated macro's for
jumping around the worksheets and calling up results from the tracker.
Every year I copy the workbook for the new financial year and the macro's
copy with it.

However, when I use the macro's in the new workbook although macro's are
enabled initially, they ask me to re-initialise and it automatically opens
the previous years workbook for which they were constructed.

Is there any way to import the Macros or to re-set the document name to
which they apply. Or do I have to re-make the Macro's for every new
workbook........

Napalm Bob
 
have you tried using thisworbook as an identifier.

for example, when coding, declare a workbook variable.
then assign thisworkbook to the variable.

This ensures you use the active book within the code blocks.

As for links... that's a different story
 
Back
Top