I am using indirect to select a sourcefile containing data and use this set of event subs in to open the dependent file when the workbook is opened, and to close the dependent file when the workbook is closed.
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.Windows(" Anonymised Data.xlsx").Activate
ActiveWindow.Close
End Sub
Private Sub Workbook_Open()
Workbooks.Open Filename:= _
"D:\ Anonymised Data.xlsx"
Application.Windows("TSCF_Loan_Application_2010_ver1.xlsm").Activate
End Sub
My problem is that the original file (TSCF_Loan_Application_2010_ver1.xlsm) is a read only file. When it is used we save the file with another file name such as 1234 abc.xlsm. This is then available for future reference and is easily identified. However when it is reopened excel looks for TSCF_Loan_Application_2010_ver1.xlsm and not the newly named file.
How can i solve this?
Thanks
Bookmarks