Open an Excel workbook

How to open a single workbook using Excel, VBA and Shortcut methods

METHOD 1. Open an Excel workbook

EXCEL

File tab > Open > This PC > Select the location of the workbook > Select the workbook

1. Select the File tab. Select File tab

2. Click Open.
3. Click ThisPC and select the location of the workbook.
4. Select the workbook to open it.
Note: in this example we are opening a workbook titled Examples.xlsx which is located in C:\Excel\.
Click Open then click This PC and then select the workbook

METHOD 1. Open an Excel workbook using VBA by directly referencing the file path and workbook name

VBA

Sub Open_a_Workbook()
'Open a Workbook

Workbooks.Open "C:\Excel\Examples.xlsx"

End Sub

PREREQUISITES
Workbook location: Have a workbook that you are referencing to in the VBA code on your device in the C:\Excel\ path.
Workbook Name: Have a workbook named Examples.xlsx, in the location specified in the VBA code.
ADJUSTABLE PARAMETERS
Workbook location: Select the file path of the workbook that you want to open by changing the C:\Excel\ path.
Workbook Selection: Select the workbook that you want to open by changing the Examples.xlsx workbook name in the VBA code to any workbook that is located in the path provided in the VBA code.

METHOD 2. Open an Excel workbook through a cell reference using VBA

VBA

Sub Open_a_Workbook_through_Cell_Reference()
'declare a variable
Dim wbfilepath As Variant
Set wbfilepath = Worksheets("Parameters").Range("A1")
'open a workbook that is referenced to in cell A1 in the Parameters sheet
wbfilepath

End Sub

PREREQUISITES
Worksheet Name: Have a worksheet named Parameters.
Workbook location and Name: Cell A1 in the Parameters worksheet needs to capture the file path, workbook's name and file type (e.g. C:\Excel\Examples.xlsx) of the workbook that you want to open.
ADJUSTABLE PARAMETERS
Cell Reference: Select the cell that captures the file path, workbook's name and file type of the workbook that you want to open by changing the cell reference in the VBA code. You can also change the worksheet's name ("Parameters") if the cell is located in another worksheet.
ADDITIONAL NOTES
Note 1: To select the workbook that you want to open you will need to insert the file path, workbook's name and file type in the cell that is referenced in the VBA code. In this example we are capturing the file details in cell A1 in the Parameters worksheet, therefore, if using the same VBA code you will need to insert the file path, workbook's name and the file type in that cell.

METHOD 3. Open an Excel workbook using VBA with a Browser

VBA

Sub Open_a_Workbook_with_a_Browser()
'declare a variable
Dim browser As Variant
'open and set browser parameters
browser = Application.GetOpenFilename(filefilter:="ExcelFiles,*.xl*;*.xm*")
If browser <> False Then

Workbooks.Open Filename

End If

End Sub

ADDITIONAL NOTES
Note 1: This method will open a browser where you can select the Excel workbook that you want to open. This VBA code has also setup the parameters for only Excel workbooks to appear visible in the browser.

Open an Excel workbook using a Shortcut

SHORTCUT

WINDOWS SHORTCUT

Ctrl
O

NOTES
This shortcut will instantly take you Step 2 of Excel-Method 1, which takes you to the Open screen. You can then follow Steps 3 and 4 from the Excel-Method 1 to open a workbook, which is click on ThisPC and select the location of the workbook and then select the workbook that you want to open.

Explanation about how to open a workbook

EXPLANATION

EXPLANATION
This tutorial explains and provides step by step instructions on how to open a workbook using Excel, VBA and Shortcut methods.

Excel Method: This tutorial provides one Excel method that can be applied to open an Excel workbook. This method opens an Excel workbook through an existing workbook, in four steps.

VBA Methods: This tutorial provides three VBA methods that can be applied to open an Excel workbook. Using the first VBA method, you need to include the file path and name directly in the VBA code. The second VBA method is more dynamic, which references to a cell in an Excel workbook that captures the file path and name of the Excel workbook that you want to open. The third method will let you select the Excel workbook that you want to open through a browser.

Shortcut Method: The shortcut method in this example will take you to the Open window from which you can browser and select the Excel workbook that you want to open.

RELATED TOPICS

Related Topic Description Related Topic and Description
How to open a workbook that was recently used and closed using Excel and Shortcut methods
How to open a single workbook as Read-Only using Excel and VBA methods
How to open a single workbook in Protected View using Excel and VBA methods
How to close a single workbook using Excel, VBA and Shortcut methods
How to save a workbook using Excel, VBA and Shortcut methods