I have mulitple files, all with date names that vary. The format produces names like Nov 21.xlsx.
From another file I need to go to the date named file to refresh a pivot. I've tried the code below and keep getting a run time error 9. "Script out of range."
From the locals window these are the expressions and they are correct:
: sPath : "C:\Users\clwillis\Desktop" : String
: WorkbookName : "sPath\Nov 21.xlsx" : String
This is the code:
The code stops at the fourth line from bottom: Windows("WorkbookName").Activate
Any ideas what's wrong?
Thanks, Cliff
Bookmarks