Hi all! Just as I was about to ask another question - I found the answer with regards to a variable workbook name. However, this led to another problem that if I can fix, I think what I am attempting to do is going to work great.
The macro "BACK" is used to check that the file name of another workbook is the correct name. This is stored in a Named Range "EstFileName" and when that workbook file name changes, I streamlined a way to update it. The macro (BACK) is also called using Application.Run in various other macros. What I am running into now, is how to update the code below to call the new macro "ActivateWBVariableName" while still allowing this macro to run and activate as it currently does.
The reason I am using the macro "ActivateWBVariableName" is so I only have one place to update the workbook "DATABASE.XLSM" name as I intended to update the name with the version number (such as database-v2.0.xlsm). Right now, I have a ton of macros that uses
If this won't work, I'll abandon this process and go back to post my original question.
What are your thoughts on integrating Application.Run in the above code?
Thank you! Y'all have been great in pointing me in the right direction!
The macro "BACK" is used to check that the file name of another workbook is the correct name. This is stored in a Named Range "EstFileName" and when that workbook file name changes, I streamlined a way to update it. The macro (BACK) is also called using Application.Run in various other macros. What I am running into now, is how to update the code below to call the new macro "ActivateWBVariableName" while still allowing this macro to run and activate as it currently does.
VBA Code:
Sub BACK()
'
Workbooks(Workbooks("DATABASE.XLSM").Worksheets("EstName").Range("EstFileName").VALUE).Activate
'
End Sub
The reason I am using the macro "ActivateWBVariableName" is so I only have one place to update the workbook "DATABASE.XLSM" name as I intended to update the name with the version number (such as database-v2.0.xlsm). Right now, I have a ton of macros that uses
Workbook("DATABASE.XLSM").Activate
that I am wanting to replace with:Application.Run "ActivateWBVariableName"
- however, the above macro is my current nemesis to get this all to work.If this won't work, I'll abandon this process and go back to post my original question.
What are your thoughts on integrating Application.Run in the above code?
Thank you! Y'all have been great in pointing me in the right direction!