1

当我按下按钮时,我有一个自动保存在新文件夹中的代码;代码工作正常,但兼容性检查器在允许保存之前出现。有没有办法禁用此兼容性检查器,以便使用自动保存按钮的人不会感到困惑?

这是我的代码:

Sub FILESAVE()

        ActiveWorkbook.SaveAs Filename:="H:\Digital Production Control and Tally Sheet Library\ " & Range("'Production Control Sheet'!B2") & _
        Format(Now(), " mm-dd-yyyy hh-mm AMPM"), FileFormat:=xlNormal, Password:="", _
        WriteResPassword:="kpqual", ReadOnlyRecommended:=True, CreateBackup:=False


End Sub

它创造了奇迹,但我只是不知道如何禁用兼容性检查器的问题。

4

1 回答 1

2

试试这个,告诉我它是否有效:

Sub FILESAVE()
        ' http://msdn.microsoft.com/en-us/library/gg132972(v=office.14).aspx
        '51 = xlOpenXMLWorkbook (without macro's in 2007-2013, xlsx)
        '52 = xlOpenXMLWorkbookMacroEnabled (with or without macro's in 2007-2013, xlsm)
        '50 = xlExcel12 (Excel Binary Workbook in 2007-2013 with or without macro's, xlsb)
        '56 = xlExcel8 (97-2003 format in Excel 2007-2013, xls)
        ' See more info on http://www.rondebruin.nl/win/s5/win001.htm
        ActiveWorkbook.SaveAs Filename:="H:\Digital Production Control and Tally Sheet Library\ " & Range("'Production Control Sheet'!B2") & _
        Format(Now(), " mm-dd-yyyy hh-mm AMPM"), FileFormat:=52, Password:="", _
        WriteResPassword:="kpqual", ReadOnlyRecommended:=True, CreateBackup:=False    
End Sub
于 2013-10-29T02:10:13.527 回答