macro reference changes with filename

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've a workbook called argos.xls, which is the starting file.
In this workbook data is entered by the users and then saved by using a macro.
The filename is constructed from the data entered.

When this macro is run and the filename changes from argos.xls to
whatever.xls also the reference to that specific macro changes.
When opening argos.xls the macro reference is 'whatever.xls'!macro1. Since
the workbook is available through our network and users sometimes delete
files, I have to manually update the macro references.

Is there a way to prevent or lock the macro reference to the original
workbook?

Louis
 
You should use THISWORKBOOK to refference worksheets in the same workbook as
the macro.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top