I am trying to activate a "generated" workbook that is unsaved and has no extension, just the name "Book1". If I save it as "Book1.xlsx" and then repoen it, I can refer to it. Like this.
The question is, can I refer to it while it is unsaved and named simply "Book1"? I have tried
- to no avail.
Code:
Set sh = Workbooks("Book1.xlsx").Sheets("Stats")
Set rng = sh.UsedRange
The question is, can I refer to it while it is unsaved and named simply "Book1"? I have tried
Code:
Workbooks.("Book1").Sheets("Stats").Activate