0
我想設置一個模板,該模板可以根據另一個工作表中的粘貼數據找到數據。VLOOKUP生成運行時錯誤'1004'
Private Sub GoNoGo()
Dim i As Integer
Dim OffInt As Integer
Dim Neg As Integer
Neg = -30
Dim Ret As String
Dim I3 As Cell
Dim FindValue As String
Worksheets("BF59520").Activate
Range("AE3").Activate
i = 3
OffInt = 0
Do Until ActiveCell.Offset(0, Neg).Value = ""
If ActiveCell.Offset(0, -1).Interior.Color = RGB(255, 235, 160) Then
ActiveCell.Offset(1, 0).Activate
i = i + 1
Else
ActiveCell.Value = Application.WorksheetFunction.VLookup(ActiveCell.Offset(0, -18), Worksheets("Go No Go").Range("B2:O180"), 4, False)
ActiveCell.Offset(1, 0).Activate
i = i + 1
End If
OffInt = OffInt + 1
Loop
End Sub
當循環獲取到VLOOKUP行的代碼返回運行時錯誤「1004」的錯誤:
無法獲取WorksheetFunction類的VLOOKUP財產。