我有这句话:
LArticol.Caption = Application.WorksheetFunction.VLookup(Serie.Value,[TEST], 2, 0)
我的错误是运行时错误1004 我试过
LArticol.Caption = Application.WorksheetFunction.VLookup(Serie.Value,ThisWorkbook.Sheets("ELECTRICE").Range("TEST"), 2, 0)
但......同样的事情 我真的需要帮助
CODE:
Private Sub Serie_Change()
LArticol.Caption = Application.WorksheetFunction.VLookup(Serie.Value,ThisWorkbook.Sheets("ELECTRICE").Range("TEST"), 2, 0) End Sub
Private Sub UserForm_Initialize()
Call Serii
End Sub
Serii模块
Sub Serii()
Dim Ssheet As Worksheet
Set Ssheet =
ThisWorkbook.Sheets("ELECTRICE")
If Ssheet.Cells(Rows.Count, 1).End(xlUp).Row = 1 Then
sslr = 3 Else
sslr = Ssheet.Cells(Rows.Count, 1).End(xlUp).Row
End If
For X = 3 To sslr
UserForm1.Serie.AddItem Ssheet.Cells(X, 1)
Next X
End Sub