About excel vba common warning off issues

1, close the file if the file has been modified, the system prompts you to save, use the following statement will not prompt:

ThisWorkbook.Close savechanges:=False     

False representation without saving changes, if changed to True, save the changes. akin:

ActiveWindow.Close savechanges:=False

Windows(datfile).Close savechanges:=False

。。。

2, when you save a file with the same name if the file exists, the system prompts whether to overwrite with the following statement will not be prompted with the:

When the file processing starts, turn off the alarm:
Application.DisplayAlerts = False
after the file is saved, then open alarm:
Application.DisplayAlerts = True

 

3, the following statements can eliminate the "Privacy Warning" message box:

ActiveWorkbook.RemovePersonalInformation = False

4. Finally, talk about, the following statement can turn off the screen flashes, but does not affect the progress with the status bar shows:

    Application.ScreenUpdating = False 'off the display

    Application.ScreenUpdating = True 'On Screen Display

   The method of displaying the progress status bar:

    For i = 1 To DataNo1

        . . . . . .
        'Shows the progress of
        Application.StatusBar = "has been completed:" & CStr (Round (i * 100 / DataNo1, 2)) & "%"
        DoEvents
    the Next i
5: About VBA New Workbook save the file open incompatibility problems 

ActiveWorkbook.SaveAs Filename: = Filename, FileFormat: = xlExcel8: format parameter plus

Guess you like

Origin www.cnblogs.com/zhaoxure/p/12021134.html