Public Sub TEST_LIST2()
Dim temp_sum As Integer
Dim temp_TK_Col As Integer
temp_sum = WorksheetFunction.Sum(Sheet6.Range("A1:D5"))
Sheet6.Cells(3, 1) = temp_sum
temp_TK_Col = WorksheetFunction.Match(Sheet6.Cells(1, 1), Sheet3.Range("1:1"), 0)
Sheet6.Cells(2, 1) = temp_TK_Col
End Sub
為什么Sum函式的參考沒問題,可是到了Math函式就提示“運行時錯誤1004,不能取得類 WorksheetFunction.Match的屬性”???
uj5u.com熱心網友回復:
檢查一下你的“Sheet6.Cells(1, 1)”有沒有值,我試了一下,如果這個單元格為空的話,這地方就會報錯,如果有值,就正常運行了轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/20013.html
標籤:VBA
上一篇:kiel5運行問題
