Grouping worksheets so they all open at once?

Malthus101

New Member
Joined
Jan 23, 2017
Messages
46
Office Version
  1. 2016
Platform
  1. Windows
Hello

I currently open 6 separate worksheets every morning to use throughout the day.

Rather than opening each one individually from the recent list, is there a way to group them (into a folder or something) so that with a single click I can open all 6 at once?

Thanks.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hello

I currently open 6 separate worksheets every morning to use throughout the day.

Rather than opening each one individually from the recent list, is there a way to group them (into a folder or something) so that with a single click I can open all 6 at once?

Thanks.
Do you mean workbooks? Assume you have all the workbooks you wanted to open in a folder.

VBA Code:
Sub OpenWorkbooksInFolder()
    Dim FolderPath As String
    Dim FileName As String
    Dim wb As Workbook
    
    FolderPath = "C:\YourFolderPath\" ' Update with your folder path
    
    If Dir(FolderPath, vbDirectory) = "" Then
        Exit Sub
    End If
    
    Application.DisplayAlerts = False
    
    FileName = Dir(FolderPath & "*.xlsx") 'Update extension if needed
    
    Do While FileName <> ""
        Set wb = Workbooks.Open(FolderPath & FileName)
        FileName = Dir
    Loop
    
    Application.DisplayAlerts = True
End Sub
 
Upvote 0
Put the all files in a folder.
In the same folder, create a new .txt file. Make sure the file extensions are visible in Explorer settings. Rename the .txt file as "OpenMultipleFiles.vbs"
Right click to file and click Edit.
Paste the code below into file:
Code:
Set WshShell = WScript.CreateObject("WScript.Shell")
strCurDir = WshShell.CurrentDirectory
Set xlObj = CreateObject("Excel.Application")
xlObj.visible = True
xlObj.Workbooks.Open(strCurDir & "\Workbook1.xlsx")
xlObj.Workbooks.Open(strCurDir & "\Workbook2.xlsx")
xlObj.Workbooks.Open(strCurDir & "\Workbook3.xlsx")
xlObj.Workbooks.Open(strCurDir & "\Workbook4.xlsx")
xlObj.Workbooks.Open(strCurDir & "\Workbook5.xlsx")
xlObj.Workbooks.Open(strCurDir & "\Workbook6.xlsx")
Replace the file names with yours. Save and exit. You can click all the files at once by only double-clicking this file.
 
Upvote 0
Thanks! Both look doable...

But technically speaking, which is better to use? WScript or VBA?

Thanks.
 
Upvote 0
You can embed @BigBeachBananas 's solution in a Workbook_Open event of one of the workbooks and the other workbooks will open eventually.
My solution opens all at once. Functionally they are the same. With my solution, you don't have to save none of the files as xlsm -if this is an issue.
 
Upvote 0

Forum statistics

Threads
1,215,148
Messages
6,123,306
Members
449,095
Latest member
Chestertim

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top