Little issue that has been bugging me and I was wondering if some guru out there could help with this. Each month I run a macro, part of which is: -
Range("A23").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Windows("02_Feb_O-Hs_09.xls").Activate
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
The issue is that each month I rename the excel file, so where we have ("02_Feb_O-Hs_09.xls") the following month would be ("03_Mar_O-Hs_09.xls"), however when I run the macro it tells me it cannot find the original file name so I have to manually correct the above each time. Is there a way the vb code can be edited so that it reads the file name, so no matter what it is called , when I run the macro it will run?
Many Thanks for any help.
Range("A23").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Windows("02_Feb_O-Hs_09.xls").Activate
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
The issue is that each month I rename the excel file, so where we have ("02_Feb_O-Hs_09.xls") the following month would be ("03_Mar_O-Hs_09.xls"), however when I run the macro it tells me it cannot find the original file name so I have to manually correct the above each time. Is there a way the vb code can be edited so that it reads the file name, so no matter what it is called , when I run the macro it will run?
Many Thanks for any help.