它说我预期的参数太少 15 ......这是我刷新前后的问题。
1级
Public WithEvents qt As QueryTable
Private Sub qt_AfterRefresh(ByVal Success As Boolean)
Application.Worksheets("RawDataLines").Range("A1") = Application.Worksheets("RawDataLines").Range("C1")
Application.Run "'Operation Get Ipads.xls'!Assembly1_Button"
End Sub
2 级
Public WithEvents qut As QueryTable
Private Sub qut_BeforeRefresh(Cancel As Boolean)
Worksheets("RawDataLines").Range("C1") = _
"='H:\Departments\Manufacturing\Production Links\DashBoard Breakdown\[MASTER_LIVE_STATUS_DATA.xls]Sheet1'!R1C1"
If Application.Worksheets("RawDataLines").Range("C1") = Application.Worksheets("RawDataLines").Range("A1") Then
Cancel = True
End If
End Sub
初始化:
Dim T As New Class1
Dim H As New Class2
Sub Initialize_It()
Set T.qt = ThisWorkbook.Sheets(3).QueryTables(1)
Set H.qut = ThisWorkbook.Sheets(3).QueryTables(1)
End Sub