Excel automatically open recently used documents

Icon_Excel10_33x32With 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. Create 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, open the tab after starting Excel View. The button can be found on the far right of the menu ribbon macros. Select in the drop-down menu of this button Makro record.

1_record_macro 

In the window that opens there must be a Macro name be awarded. Since this name is no longer relevant later, a test is simply assigned here. It is important that under the point Save macro in can Personal macro workbook is saved.

2_Macroname 

If the macro is activated via the button OK started, the recording right again completed will. This is then also possible via the Macros button.

3_end_recording 

The preparation is now complete. The personal macro workbook is now available.


2. Macro to automatically open recently used workbooks

The key combination is used to switch from the Excel environment Alt + F11 into the VBA environment.

In the left area of ​​the window, right-click on the VBAProject (PERSONAL.XLSB) a new module inserted.

 4_module_einfuegen 

Following Command sequence 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 

5_Macro

Now the one marked by the rectangle can row through the following Scope replaced Werden:

6_selection 

  

In the first case will be all workbooks opened in the list of Last used are located. Alternatively, you can only use the Last or for example the last three Have documents opened automatically with Excel.

6_1_list

Finally, in the VBA environment saved. Will Excel now! new gestartet, depending on the selection, the respective Workbooks Automatically with .

7_Save

 

read a comment

 

Transparency: This article may contain affiliate links. These lead directly to the provider. If a purchase is made through this, we receive a commission. There are no additional costs for 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

Warning:
Using Registry Editor or its tips incorrectly can cause serious system problems that may require you to reinstall your operating system. Tampering with the registry files and using the tips is at your own risk.