# Calculate Method of Worksheet Object VBA

Calculate Worksheet Method in VBA is used to calculate all open workbooks or a specific worksheet in a workbook or a specified range in a worksheet.

ON SALE80% OFF

50+ Project Management Templates Pack
Excel PowerPoint Word

Advanced Project Plan & Portfolio Template
Excel Template

PowerPoint Slides

20+ Excel Project Management Pack
Excel Templates

20+ PowerPoint Project Management Pack
PowerPoint Templates

10+ MS Word Project Management Pack
Word Templates

## Why we use Calculate Worksheet Method in VBA?

If a workbook or a worksheet or a specific range has formulas we need to refresh each time when the values are changing. In that time we can use Calculate Worksheet Method in VBA.

## VBA Calculate Worksheet Method- Syntax

Here is the example syntax to Calculate Worksheet method in Excel VBA.

Worksheets(“YourSheetName”).Calculate

Where Worksheet represents the object and Calculate is the method of worksheet object.

## VBA Calculate Worksheet Method: All Open Workbooks

Please see the below VBA code to Calculate all open Workbooks. In this example we are using calculate method of application object.

```Sub Calculate_AllOpenWorkbooks()
Application.Calculate
End Sub
```

## VBA Calculate Worksheet Method: In Specific Sheet

Please see the below VBA code to Calculate in specified Worksheet named “Sheet1”.

```Sub Calculate_Sheet()
Sheets("Sheet1").Calculate
End Sub
```

## VBA Calculate Worksheet Method: In Specified Range

Please see the below VBA code to Calculate in specified range (“A1:E10”) in a specified worksheet named “Sheet1”.

```Sub Calculate_Range()
Sheets("Sheet1").Range("A1:E10").Calculate
End Sub
```

## VBA Calculate Worksheet Method: Instructions

Please follow the below step by step instructions to execute the above mentioned VBA macros or codes:

1. Open an Excel Worksheet
2. Press Alt+F11 to Open VBA Editor
3. Insert a Module from Insert Menu
4. Copy the above code for activating worksheet and Paste in the code window(VBA Editor)
5. Save the file as macro enabled Worksheet
6. Press ‘F5’ to run it or Keep Pressing ‘F8’ to debug the code line by line and observe the calculations in the Worksheet.
LIMITED TIME OFFER

### One Comment

1. doug wesson November 18, 2016 at 3:43 AM - Reply

Is there a way to call VBA Code when a cell value gets changed, when one calculates the worksheet

## Related pages

easy excel vbachecklist excel templatefreshers interview questions and answersvba matchhow to remove blank rows in excel 2007show merged cells in excelswot analysis templates powerpointexcel visual basic tutorial pdfformula vlookup in exceluseful macros excelhow to remove all hyperlinks in excelexcel logical and operatorimport worksheet excelexcel macros how todelete duplicate lines in excelproject planner excel templatefreshers interview questions and answers technicalvba excel arraysql dml statements examplesvba do until loopvba excel worksheetvb dialog boxvb rangemicrosoft excel project timeline templatesub function vbaexcel vba create checkboxexcel macro formatmicrosoft excel templates project managementdrop down boxes in excel 2007activate sheet vbavba declare arraygetopenfilename vbaexcel project management tracking templatesstep by step vlookup in excelvba check folder existsvba xml tutorialexcel remove characterstypes of excel graphscells.find excel vbaexample of vlookup formulacountifs functioncreate excel macrosisna formula in excelvba excel referencesumif excel 2010 exampleshort cut key of excelhow to create a tick box in excelexcel vba project examplesexcel 2007 add chart titlevba average functionpassword protect excel 2010 workbookhow to prepare dashboard in excel 2007excel formulas greater thancreate project timeline in excelmacro excel tutorialsumif excel functionexcel vba protect sheetdelete duplicate names in excelconcatinate in excelexcel 2007 remove hyperlinksexcel macro samplesvba singleadd the developer tab to the ribbon on wordjoining cells in excelsas programming tutorial for beginnersexcel calculate vbavba combobox multiple columnsrecording macro in excelpivot table in sql server 2008 exampleexcel macro recordingactive row vbaapplication.worksheetfunction.vlookupexcel cell mergevba combobox examplevba clear entire sheetvba loop break