REAL-TIME

VBA Projects

Full Access with Source Code
  • Designed and Developed by PNRao

  • Full Access with VBA Source Code

  • Well Commented Codes Lines

  • Creative and Professional Design

Effortlessly
Manage Your Projects

120+ Project Management Templates

Seamlessly manage your projects with our powerful & multi-purpose templates for project management.

120+ PM Templates Includes:
  • 50+ Excel Templates

  • 50+ PowerPoint Templates

  • 25+ Word Templates

Share Post

We can save workbook by using ‘Save’ method of workbook object in Excel VBA. Please find the following brief description about save method of workbook object.

VBA Save Method Excel Workbook Object

Why we need to Save Workbook using VBA?

When we do any changes in Excel workbook then we may want to save the changes for further reference. So that only we need to save workbook to see modifications when you open your workbook next time. It Saves changes to the specified workbook.

VBA Save Workbook – Syntax

Here is the syntax to save workbook using VBA.

Workbooks(“Your Workbook Name”).Save()

In the above syntax we are using ‘Save’ method of workbook object to save the workbook.

VBA Save Workbook:Example 1

Please find the below example, It will show you how to save workbook.

Sub Save_Workbook()

    Dim Wkb As Workbook
    Set Wkb = Workbooks.Add
    Wkb.Save
  End Sub

Explanation: In the above example we have created variable named Wkb in the first statement. We have used ‘Add’ method of workbook object to add new workbook and then assigned it to object named Wkb in the second statement. At last in the third statement we have used ‘Save’ method of workbook object to save newly created workbook.

VBA Save Workbook: Example 2

Please find the below example, It will show you how to save active workbook.

Sub Save_Active_Workbook()
    ActiveWorkbook.Save
End Sub

Note: Here ActiveWorkbook object represents the workbook which we currently activated.

VBA Save Workbook – Instructions

Please follow the below steps to execute the VBA code to save the excel file.
Step 1: Open any existing Excel workbook
Step 2: Press Alt+F11 – This will open the VBA Editor
Step 3: Insert a code module from then insert menu
Step 4: Copy the above code and paste in the code module which have inserted in the above step
Step 5: Activate any workbook
Step 6: Now press F5 to execute the code
Now you can observe that your Active Excel workbook is saved with the changes.

Effortlessly Manage Your Projects and Resources
120+ Professional Project Management Templates!

A Powerful & Multi-purpose Templates for project management. Now seamlessly manage your projects, tasks, meetings, presentations, teams, customers, stakeholders and time. This page describes all the amazing new features and options that come with our premium templates.

Save Up to 85% LIMITED TIME OFFER
Project Management Templates

All-in-One Pack
120+ Project Management Templates

Essential Pack
50+ PM Templates

Excel Pack
50+ Excel PM Templates

PowerPoint Pack
50+ Excel PM Templates

MS Word Pack
25+ Word PM Templates

Ultimate Project
Management Template
Ultimate Resource
Management Template
Project Portfolio
Management Templates
Last Updated: March 2, 2023

Leave A Comment