Home > Software engineering >  Close the current workbook is not saved
Close the current workbook is not saved

Time:09-19

To build a close the current workbook does not save macros, what is spelled correctly? Which eldest brother help me to change
ThisWorkbook Close savechanges:=False

CodePudding user response:

Application. DisplayAlerts=False 'don't prompt
ThisWorkbook. Close SaveChanges:=False 'is not saved

CodePudding user response:

Use ThisWorkbook. Close False or ThisWorkbook. Close SaveChanges:=False can,
Use this, don't have to close the Excel. The Application of the "warning" (closed, if use code should also be at the right place "after" in code open),

You ZhuTie the code written, it is not in conformity with the grammar,
"ThisWorkbook" is an "object", calls its property/function/process, to add a "point" behind the ThisWorkbook period (in English),
And then followed by name, write the corresponding property/function/process and related parameters (if you have parameters),

  •  Tags:  
  • VBA
  • Related