Does 'file3' ever become visible when the code is running?
In any event, it seems to me you should be able to dispense with 'file2' by adding code to 'file1' to modify the hyperlink so that it always points to the correct month. You sould be able to do this if, instead of creating the hyperlink directly, you use the hyperlink function. For example:
=HYPERLINK("C:\Users\Gratje\Documents\My WorkBook Base Name"&TEXT(MONTH(TODAY()),"00")&".xlsx","C:\Users\ Gratje\Documents\My WorkBook Base Name"&TEXT(MONTH(TODAY()),"00")&".xlsx")
The above will update the hyperlink everymonth, so that, in January, it points to 'My WorkBook Base Name01', in August it points to 'My WorkBook Base Name08', etc.
The alternative is to use an Auto macro in 'file1' that updates the hyperlink each time it's opened.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|