Would like to find a macro that opens the most recent workbook. Any help appreciated!!
Would like to find a macro that opens the most recent workbook. Any help appreciated!!
Hi Xx7,
Looking in the Object Browser for the word Recent landed me this code:
Use the above in a macro that opens a file and see what happens.![]()
Application.RecentFiles(1).Name
I'd bet if you changed the 1 to a 2, you'd open the second most recent file.
hope that helps
One test is worth a thousand opinions.
Click the * Add Reputation below to say thanks.
Cool.. Thx Marvin. Your right .. you can enter a number to open a different file ... Thx.
![]()
Public Sub Demo() On Error Resume Next Application.RecentFiles(Application.InputBox("Enter Numer", "open book", 1, , , , , 1)).Open End Sub
Beauty... thx!!![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks