I have a macro that does a vlookup on another Excel file that is already open based on the file name. I want to use this macro with Excel files that have different names. Is there any way to update my code below so it works with whatever other open Excel file exists and is not tied specifically to the file named below?
My rational is that if I only have one other file open, it will always go to the correct file, regardless of the file name.
Windows("Payroll Calc MACRO TEMPLATE 4-8-2013.xlsm").Activate
I want it to be something like: Windows("Payroll Calc MACRO TEMPLATE*.xlsm").Activate
Where the * represents various possible naming conventions.
Thanks,
Steve
Bookmarks