Results 1 to 6 of 6
  1. #1
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Calgary, Alberta, Canada
    Posts
    818
    Thanks
    6
    Thanked 1 Time in 1 Post

    Question Open last spreadsheet on startup, or ask which one to open?

    I have two questions: (running Excel 2010 under Windows 8.1)

    1. Is it possible to get Excel to open the last spreadsheet it opened without having to use the XLSTART folder. I really don't want to keep files in the XLSTART folder, rather, I would like to keep them in a more relevant folder? Each spreadsheet is kept in a folder relevant to what the spreadsheet is about. That way, I do not have to remember which spreadsheets are in the XLSTART folder, or not.

    2. Is it possible to have Excel ask which spreadsheet to open based on, for example, the last five I have worked on?

    Ron M

  2. #2
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,633
    Thanks
    115
    Thanked 647 Times in 590 Posts
    Ron,

    If you place the following code in the ThisWorkbook module, the most recent workbook will open

    Code:
    Private Sub Workbook_Open()
        Workbooks.Open Application.RecentFiles(1).Name
    End Sub
    You could adapt the code opening an input box and asking for the number of the most recent file which gets assigned to a variable. Then add the variable to the code
    line as follows

    Code:
    Workbooks.Open Application.RecentFiles(variable).Name
    HTH,
    Maud

  3. #3
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,434
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Ron,

    The easy answer is to right click on the Excel Icon on the task bar or start menu and select from the Jump List.

    Task Bar:
    JumpList.PNG

    Classic Shell Start Menu:
    JumpListSB.PNG

    Win 10 Start Menu:
    JumpListW10.PNG

    If there is a reason these won't work for you post back and we can work on an Auto_Open macro that will be stored in your Personal.xls file.

    P.S. Knowing your version of Windows and Excel would be a big help in providing assistance.

    HTH
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  4. #4
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,633
    Thanks
    115
    Thanked 647 Times in 590 Posts
    Ron,

    I think I read too much into your request. I was thinking that from within excel, you wanted to open your most recent list. But of course, the most recent file opened will be the one that you are running the code from unless starting from a new workbook.

    Maud

  5. #5
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Calgary, Alberta, Canada
    Posts
    818
    Thanks
    6
    Thanked 1 Time in 1 Post
    Sorry for forgetting to include - Windows 8.1 (soon to be Win 10) and Excel 2010.

    Ron M

  6. #6
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Calgary, Alberta, Canada
    Posts
    818
    Thanks
    6
    Thanked 1 Time in 1 Post
    RetiredGeek, your suggestion is exactly the sort of thing I am looking for. It works. Thank you.

    Ron M

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •