Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
In the general case, it is best not to refer to anything with a string
literal. ThisWorkbook.Name is a good method, as people have pointed out. If you must refer to multiple files, use string constants, or in your master workbook, set up a sheet where you have named ranges containing the strings, then initialize them at application startup - Workbook_Open() or whatever your entry point is. On Nov 15, 11:48 am, JoeAdidas21 wrote: I have a workbook named ABC.xls, in that workbook are several macros that reference the currently named workbook ... ABC.xls. Now, my users rename the workbook to 123.xls. When they go to run the macro in the newly named 123.xls workbook the macro fails because there are references to the old workbook name of ABC.xls. Is there a way to avoid this .. one note, having the user NOT rename the workbook is not an option. Is there a way to use a variable to reference the workbook no matter what it is named, pehaps ? Thanks in advance, Joe |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Saving XLS workbook with set filename | Excel Discussion (Misc queries) | |||
link to other workbook with changing filename | Excel Worksheet Functions | |||
set filename to <filename-date on open | Excel Worksheet Functions | |||
Filename in footer automatically in new workbook. | Excel Discussion (Misc queries) | |||
How do I remove multiple windows of 1 workbook (filename.xls:2,:3 | Excel Discussion (Misc queries) |