我有一个VBS脚本,在执行时会刷新excel(2013)文件中的数据。但是它在
上给出了错误xlBook.DisplayAlerts = False
错误消息指出对象不支持此属性或方法' ' DisplayAlerts'
这是VBS脚本
Option Explicit
Dim xlApp, xlBook, xlSheet
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Open("C:\Users\me\Desktop\"& "Book1.xlsx")
Set xlSheet = xlBook.worksheets.item(1)
xlBook.DisplayAlerts = False
xlBook.RefreshAll
xlBook.Save
xlBook.Close
xlApp.Quit
Set xlSheet = Nothing
Set xlBook = Nothing
Set xlApp = Nothing
答案 0 :(得分:1)
xlApp.DisplayAlerts = False
是{{1}}对象
{{1}}