我有一个表单,我想用玫瑰和客户工作表中存储的数据填充两个列表框。下面带有* *的代码行给我带来了麻烦。
Private Sub UserForm_activate()
Application.Workbooks("xx.xlsm").Activate
ActiveWorkbook.Worksheets("Customers").Range("B2").Select
Do Until IsEmpty(ActiveCell) = True
'loop through the customer table list
lstCustomers.AddItem ActiveCell.Value
ActiveCell.Offset(1, 0).Select
Loop
*****ActiveWorkbook.Worksheets("Roses").Range("A3").Select
Do Until IsEmpty(ActiveCell) = True
'loop through the roses table list
lstProducts.AddItem ActiveCell.Value
ActiveCell.Offset(1, 0).Select
Loop
End Sub
错误:范围类的选择方法失败
我究竟做错了什么?