Line:14
Char:6
Error:Expected'Sub'
Code:800A03F8
Source:Microsoft VBScript compilation error
xlsFileCons = "C:\TEST.xlsx"Call RefreshExcel(xlsFileCons)Sub RefreshExcel(f)
Set ExcelApplication = CreateObject("Excel.Application")
Set WB = ExcelApplication.Workbooks.Open(f) ExcelApplication.DisplayAlerts = False
WB.Worksheets("Sheet1").QueryTable("表_TEST").Refresh
End If
WB.Save
WB.Close Set WB = Nothing
Set ExcelApplication = NothingEnd Sub
Char:6
Error:Expected'Sub'
Code:800A03F8
Source:Microsoft VBScript compilation error
xlsFileCons = "C:\TEST.xlsx"Call RefreshExcel(xlsFileCons)Sub RefreshExcel(f)
Set ExcelApplication = CreateObject("Excel.Application")
Set WB = ExcelApplication.Workbooks.Open(f) ExcelApplication.DisplayAlerts = False
WB.Worksheets("Sheet1").QueryTable("表_TEST").Refresh
End If
WB.Save
WB.Close Set WB = Nothing
Set ExcelApplication = NothingEnd Sub
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货