这是我的代码:
With Worksheets("List of Accounts").ListObjects("ListofAccounts").ListColumns(1).Range
Total_rows_Accounts = .Find(What:="*", _
After:=.Cells(1), _
Lookat:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Row
End With
If Total_rows_Accounts > 1 Then
lbxCurrent.RowSource = "List of Accounts!A2:A4"
End If
我的工作表是什么样的:
错误:
答案 0 :(得分:7)
您的范围不正确。它应该是lbxCurrent.RowSource = "'List of Accounts'!A2:A4"
由于工作表名称中的空格而导致错误