How to rename an opened or active workbook in Excel?
In certain situations, you may find it necessary to rename an Excel workbook that is currently open. However, since Excel does not allow direct renaming of an open file through standard file system operations, the usual process requires closing the workbook, finding its location in File Explorer, and then renaming it. This can be inconvenient and interrupt your workflow, particularly if you are working with multiple files or need to rename files frequently. This tutorial provides several practical methods to rename an actively opened workbook directly within Excel, simplifying the renaming process and minimizing disruptions.
Rename the opened workbook with the Save As command
Rename the opened workbook with Office Tab
Rename the opened workbook with the VBA code
Rename the opened workbook with the Save As command
When you need to rename the currently active workbook but prefer to avoid closing and reopening files, the Save As command provides a straightforward workaround. This method is suitable when you want to change the workbook's file name while working on it, and it works in all Excel versions.
1. Click the File tab (or the Office button in Excel 2007) in the ribbon, and choose Save As from the available options. This will open the Save As dialog box, as shown below:
2. In the Save As dialog, enter the new desired name for your workbook in the File name textbox. For example, you might adjust the name to reflect the current project or version. See the screenshot below for reference:
Tip: In Excel 2013 or Excel 2016, after clicking File > Save As, you may need to click Browse to open the traditional Save As dialog and access the file name field.
3. Click Save. The workbook will be saved with the new name you provided. Your current instance of Excel will now reference the workbook using its new name, while the previous file will remain unchanged in its original location (unless you choose to delete it afterwards).
Notes and practical tips: The old file will not be deleted automatically; you may want to remove it manually if it is no longer needed. Additionally, if you are working with file sharing or version control systems, ensure that renaming files does not disrupt collaboration or existing references.
If there are formulas, links, or VBA codes in other files that refer to the old file name, these will not update automatically, so review any dependencies to prevent errors.
Rename the opened workbook with Office Tab
For users who prefer an even quicker method and regularly manage multiple open workbooks, the Office Tab add-in offers a solution with enhanced usability. Office Tab enables you to work with workbooks in a tabbed interface, similar to web browsers, and also provides extra file management options—including renaming files.
After installing Office Tab, follow these steps:
1. Navigate to the workbook you want to rename. Right-click on the workbook's tab at the top of the Excel window, and select Rename from the context menu as illustrated below:
2. Within the Office Tab dialog, type the new name for your workbook in the text field provided. Take care to avoid entering forbidden characters (such as / \ : * ? " < > |
), which are not allowed in file names. See the screenshot below:
3. Click OK. The workbook will be renamed immediately, and you will not need to close or reopen it. The change is reflected in both the tab and the file's actual name on your computer, as shown here:
Advantages: This method is especially convenient for those who manage numerous files at once and require frequent, rapid renaming. The intuitive tabbed workflow can improve efficiency without interrupting your work.
Cautions: Office Tab is an external add-in and must be installed separately. Please ensure it is compatible with your version of Excel (Office Tab works with most modern versions). For best results, regularly update the add-in to avoid compatibility issues with new Excel updates.
Rename the opened workbook with the VBA code
For advanced users, VBA (Visual Basic for Applications) offers a flexible approach to programmatically renaming the active workbook by saving it under a new name and, if needed, deleting the original file. This is particularly useful if you are automating a batch renaming process or need to integrate the renaming step into a longer macro workflow.
Before using this method, it's important to understand that Excel does not support changing an open file's name directly; instead, the macro saves the active workbook under a new file name, optionally deletes the old file, and switches context to the new file.
1. Click Developer > Visual Basic to open the Microsoft Visual Basic for Applications window. In the window, click Insert > Module, then paste the following code into the new module:
Sub RenameActiveWorkbook()
Dim newFullName As String
Dim oldFullName As String
Dim fDialog As FileDialog
Dim response As VbMsgBoxResult
On Error Resume Next
xTitleId = "KutoolsforExcel"
oldFullName = ThisWorkbook.FullName
' Prompt for new file name and location
Set fDialog = Application.FileDialog(msoFileDialogSaveAs)
With fDialog
.Title = "Select new file name for the active workbook"
.InitialFileName = ThisWorkbook.FullName
If .Show = -1 Then
newFullName = .SelectedItems(1)
Else
Exit Sub
End If
End With
' Save the workbook with the new name
ThisWorkbook.SaveAs Filename:=newFullName, FileFormat:=xlOpenXMLWorkbook
' Ask if the old file should be deleted
response = MsgBox("Do you want to delete the old file?" & vbCrLf & oldFullName, vbYesNo + vbQuestion, xTitleId)
If response = vbYes Then
Kill oldFullName
End If
MsgBox "Workbook renamed successfully.", vbInformation, xTitleId
End Sub
2. To run the macro, press F5 or click the Run button in the VBA editor. A Save As dialog will open, allowing you to enter the new name and location for your active workbook (ensure you use a valid file name without special characters).
After saving, you'll be prompted to confirm if you want to delete the original file. If you select "Yes," the old file will be permanently deleted (cannot be undone). If you choose "No," it will remain unchanged. The current session will now reference the workbook under its new name.
Tips and notes: Always make a backup before running this macro to prevent accidental loss of data. After renaming, confirm that all links, formulas, and references between files are still valid, as file name changes may affect external references. If an error occurs, double-check the file path and file name, and ensure you have sufficient permissions for file operations in the folder.
This approach is best suited for experienced users who are comfortable with VBA and file management automation. If you encounter issues with this macro, ensure macros are enabled, and try running Excel as administrator if you encounter permission-related errors.
Relative Articles:
- How to count the number of visible sheets in a workbook?
- How to easily convert between multiple energy units in Excel?
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
All Kutools add-ins. One installer
Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.





- All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
- One installer, one license — set up in minutes (MSI-ready)
- Works better together — streamlined productivity across Office apps
- 30-day full-featured trial — no registration, no credit card
- Best value — save vs buying individual add-in