With quick access, Excel 2010 already offers a way to manage the last used files to have a direct view and to be able to access it quickly. Would you like to go a step further and find the workbook you used last or, for example, even the last three workbooks when you start Excel automatically öffnen this can be done by creating a macro.
1. Creating a "Personal Macro Workbook "
In preparation, the ″ Personal Workbook ″ must first be created if it does not already exist. The reason for this is that the actual macro for the automatic opening of the files should not only apply to the currently active workbook, but also to all other files.
To do this, after starting Excel, open the View tab . On the far right of the ribbon, you will find the Macros button . In the drop-down menu of this button, select Record Macro.
In the window that opens, you need to enter a macro name . Since this name will have no relevance later, simply use "Test". It's important to save the macro to your personal macro workbook under the "Save Macro" option.
If the macro is started via the OK button , the recording can be stopped immediately . This is also possible via the Macros button.
The preparation is now complete. The personal macro workbook is now available.
2. Macro to automatically open recently used workbooks
You can switch from the Excel environment to the VBA environment using the keyboard shortcut Alt + F11 .
In the left area of the window, a new module is inserted by right-clicking on VBAProject(PERSONAL.XLSB).
The following sequence of commands can now be inserted into the window that opens:
Sub Auto_open ()
Dim i As Integer
If Application.RecentFiles.Count = 0 Then
Exit Sub
End If
For i = 1 To Application.RecentFiles.Count
Application.RecentFiles (i) .Open
Next i
End Sub

The row marked by the rectangle can now be replaced by the following options :
In the first case, all workbooks in the Recent list will be opened . Alternatively , you can choose to automatically open only the most recent workbook or, for example, the last three documents with Excel.

Finally, the changes are saved in the VBA environment . When Excel is restarted , the respective workbooks will open automatically , depending on the selection.

| Transparency: | This article may contain affiliate links. These will take you directly to the provider. If you make a purchase through one of these links, we will receive a commission at no extra cost to you. These links help us to refinance the operation of win-tipps-tweaks.de. |
This tip comes from www.win-tipps-tweaks.de
© Copyright Michael Hille
