Hi Team,
请帮助我,我无法运行以下VBA,说运行时错误'1004'
我正在尝试在userform
中的活动表格中显示内容程序:
Private Sub ComboBox1_DropButtonClick()
Dim i As Long
Dim LastRow As Long
LastRow = Range("A65000").End(xlUp).Row
if Me.ComboBox1.ListCount = 0 Then
For i = 2 To LastRow
Me.ComboBox1.AddItem ActiveSheet.Cells(i, "a").Value
Next i
End If
End Sub
Private Sub ComboBox1_Change()
Dim i As Long
Dim LastRow As Long
LastRow = Range("A65000").End(xlUp).Row
For i = 2 To LastRow
If ActiveSheet.Cells(i, "A") = (Me.ComboBox1) Then
Me.txtrfxno = ActiveSheet.Cells(i, “b”).Value
Me.txtsd = ActiveSheet.Cells(i, “c”).Value
End If
Next i
End Sub
Private Sub UserForm_Click()
End Sub
请帮帮我!!!