I am trying to make a global variable that takes the value of ThisWorkbook.Name when opened. This way I can change the excel files name but use a variable in my code when switching between 2 workbooks. Can someone show me the syntax to do this? In the example code I declare a public variable and then attempt to rename it when opening the workbook. However, in WorkSheetExists the "subscript is out of range."Please Login or Register to view this content.
Bookmarks