RejectAllChanges Method of Workbook Object VBA

RejectAllChanges Workbook method in VBA is used to rejects all changes in the specified or mentioned shared workbook. Shared workbook can have more than one user to edit, delete or change to the workbook.

PREMIUM TEMPLATES LIMITED TIME OFFER

ON SALE80% OFF

50+ Project Management Templates Pack
Excel PowerPoint Word

Advanced Project Plan & Portfolio Template
Excel Template

Business Presentations Templates Pack
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 RejectAllChanges Workbook Metod using VBA?

Shared workbook may have multiple users. Sometimes we may not needed the changes or modifications by the user, in that time we will reject all the changes by using RejectAllChanges workbook method using VBA.

VBA RejectAllChanges Workbook Method- Syntax

Here is the syntax to RejectAllChanges workbook method using VBA.

Workbooks(“Your Workbook Name”).RejectAllChanges(

[When], [Who], [Where])

Here,
When: It is an Optional parameter. It specifies when(time) all the changes are rejected in the workbook.
Who: It is an Optional parameter. It specifies all the changes are rejected by whom.
Where: It is an Optional parameter. It specifies where all the changes are rejected.
In the above syntax Workbook is object and VBA RejectAllChanges method of Workbook object.

VBA RejectAllChanges Workbook Method: Example 1

Here is the syntax to VBA RejectAllChanges Workbook method using VBA.

Sub Workbook_RejectAllChanges()
ActiveWorkbook.RejectAllChanges
End Sub

VBA RejectAllChanges Workbook Method- Instructions

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

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

Leave A Comment


Related pages


how to do pivot tables in excel 2013excel vba clear rangeexcel formulas with examples in excel sheetexcel vba user formsexcel formulas concatenateunhide worksheetadd radio button in excelsql interview question for freshervba range colorif cell contains text then excellistbox userform vbaexcel macro variablesms access nested iifuse of vlookup and hlookupsubstitute function vbacreating userforms in excelvba integer rangevba displayhow to do a pivot table in excel 2010vba in excel 2007visual basics for excelexcel vba close filespeed up excel macrounprotect excel without passwordvba programming coursehow to calculate difference between two dates in excelhow to protect worksheet in excelexcel vba sort rangeexcel formula with example in hindivba excel codemsdasql providerexcel delete extra rowsbuilding excel dashboardsexcel advanced macroshorizontal lookup in excelhow to delete a header in excelpassword protect spreadsheetexcel formulas shortcutsexcel vba programming for dummiesdelete row excelhow to delete worksheet in excelcustomer management excel templateinterview questions and answers for mis executiveword vba saveasinsert check box in excelvb database connectivity with accessvba select sheethow to use the pivot table in excel 2007types of errors in ms excelcopy vba codepowerpoint vba referencesql ddl dml dcl tcl commands pdfproject planner freewareproject status report dashboard templatekpi dashboard excel templateunlock excel workbookmicrosoft excel macro tutorialmacros in excel 2007 for beginnersvba for loop stepword vba examplessql basic commands with examplesvba user defined functionhow to use sumif function in excel 2010project management timeline excel templatevba save as csvhow do i insert a row in excelhow to make a drop down list in excel 2007project dashboard in excelcolor code worksheetslistbox in vbwhat is a userform in excelunprotecting excel workbook without password