Hello,
Is there a way to use variables between different open workbooks?
I'm writing an application based around a template file and multiple (~15) fixed spreadsheets which collectively act as a database. A user will create a new spreadsheet based on the template, and from this spreadsheet they will randomly open one or more database sheets, one at a time, to select items that get copied back to the original sheet that was based on the template.
Because I'll never know what the user names their file, currently I am referring to the original file with "Workbooks(1).Worksheet("MySheet")"; however this breaks if files are opened in the wrong order. Also, in the database sheets I have a need to call code residing in the template-based file; I've tried Application.Run without success.
I would like to be able to set the user's file name and the current database file name as variables so that I can refer to each from the other. Is it possible to do this?
Thank you,
Wayne
Is there a way to use variables between different open workbooks?
I'm writing an application based around a template file and multiple (~15) fixed spreadsheets which collectively act as a database. A user will create a new spreadsheet based on the template, and from this spreadsheet they will randomly open one or more database sheets, one at a time, to select items that get copied back to the original sheet that was based on the template.
Because I'll never know what the user names their file, currently I am referring to the original file with "Workbooks(1).Worksheet("MySheet")"; however this breaks if files are opened in the wrong order. Also, in the database sheets I have a need to call code residing in the template-based file; I've tried Application.Run without success.
I would like to be able to set the user's file name and the current database file name as variables so that I can refer to each from the other. Is it possible to do this?
Thank you,
Wayne