答案1
答案2
我的解決方案
而不是禁用文件檢驗員這在VB中似乎很難做到,我只是阻止訊息本身。我並不真正關心源文件,我只是想無縫地從中複製數據,這樣這在我的情況下就可以正常工作。
通過將此代碼添加到我的代碼的開頭,我不再得到文件檢驗員警告:
'Disable privacy settings warning
Application.DisplayAlerts = False
答案3
開啟文件 > alt+f11 > Module Thisworkbook 輸入以下內容:
Private Sub Workbook_AfterSave(ByVal Success As Boolean)
Application.DisplayAlerts = True
End Sub
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Application.DisplayAlerts = False
End Sub