Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default macro reference changes with filename

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default macro reference changes with filename

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

"Louis Sweere" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot Table Filename reference in Spreadsheet XML issue Mike Excel Discussion (Misc queries) 1 August 2nd 10 09:40 PM
Variable in a filename reference in Excel 2000 pdabill Excel Discussion (Misc queries) 1 August 24th 06 11:08 PM
filename in macro ynissel Excel Discussion (Misc queries) 7 June 12th 06 08:41 PM
Excel - print to .pdf using filename reference from cell scooppbear Excel Discussion (Misc queries) 1 May 17th 06 02:36 AM
Reference in a filename.. Frode Hjoennevaag Excel Worksheet Functions 3 April 14th 05 02:47 PM


All times are GMT +1. The time now is 05:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"