How to Open Containing Folder of Current Workbook in Microsoft Excel?

Microsoft Excel is a robust spreadsheet application that provides a variety of tools to boost productivity and simplify your job. One of these features is the ability to easily access the folder that contains the worksheet you are now working on. When you need to search, organise, or share your Excel files, this tool can be quite helpful. This article will walk you step-by-step through the process of opening the current workbook's enclosing folder in Microsoft Excel. No of your level of experience, learning this trick can help you streamline your file management process and save you time.

By the end of this course, you should be able to easily access the folder where your Excel file is kept, transfer or copy the workbook, and carry out any other file management operations. Let's get started and learn how to use Microsoft Excel to open the current workbook's contained folder!

Open Containing Folder of Current Workbook

Here, we will first create a VBA module and then run it to complete the task. So let us see a simple process to know how you can open the containing folder of the current workbook in Microsoft 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.


Sub OpenContainingFolder()
Application.Dialogs(xlDialogOpen).Show ActiveWorkbook.Path
End Sub

Step 3

Then save the book as a macro-enabled template and click F5 to open the folder.


In this tutorial, we have used a simple example to demonstrate how you can open a folder containing the current workbook in Microsoft Excel to highlight a particular set of data.

Updated on: 06-Sep-2023


Kickstart Your Career

Get certified by completing the course

Get Started