How to Open an Excel File by Using Browse Window?


Microsoft Excel is a robust spreadsheet programme that is frequently used for data organisation and analysis. The initial step in working with data or editing an existing workbook is frequently opening an Excel file. Even though the File menu in Excel allows you to access previously used files, there are instances when you might need to open a file from a specific location on your computer or network. In this article, we'll walk you through how to use Excel's browse window to access an Excel file. Using this technique, you can choose the specific Excel file you wish to open by navigating to any folder or directory on your computer or network.

Whether you're a novice or a seasoned Excel user, using this straightforward but crucial function will increase your productivity and give you the freedom to work with a variety of data files with ease. By the end of this course, you will be able to use Excel's explore window to find and open Excel files from anywhere on your computer or network. So let's get started and learn more about this useful function!

Open an Excel File by Using Browse Window

Here we will first create a VBA module, then run it and select the sheet to complete the task. So let us see a simple process to know how you can open an Excel file by using the browse window in Excel.

Step 1

Consider any Excel workbook.

First, right-click on the sheet name and select View code to open the VBA application.

Right click > View Code.

Step 2

Then click on Insert, select Module, and copy the below code into the text box.

Insert > Module > Copy.

Code

Sub OpenNewBox()
Dim xFilePath As String
Dim xObjFD As FileDialog
Set xObjFD = Application.FileDialog(msoFileDialogFilePicker)
   With xObjFD
      .AllowMultiSelect = False
      .Filters.Add "Excel Files", "*.xls; *.xlsx; *.xlsm; *.xlsb", 1
      .Show
      If .SelectedItems.Count > 0 Then
         xFilePath = .SelectedItems.Item(1)
      Else
         Exit Sub
      End If
   End With
   Workbooks.Open xFilePath
End Sub

Step 3

Then save the sheet as a macro-enabled template and click F5 to open the browse window. Finally, select the file and click OK to complete the task.

Save > F5 > Select File > Ok.

Conclusion

In this tutorial, we have used a simple example to demonstrate how you can open an Excel file by using the browse window in Excel to highlight a particular set of data.

Updated on: 06-Sep-2023

35 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements