当A列有表头:人员名称,和第二行“张三”时出现错误,超过2个以上人员不报错,如何处理?
With Sheets("参数")
row1 = .Range("A10000").End(xlUp).row
arr1 = .Range("A2:A" & row1)
End With
人员.List = arr1
人员.ListIndex = 0
人员.Style = fmStyleDropDownCombo
Private Sub 人员_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If IsNumeric(人员) Then
If CInt(人员) <人员.ListCount Then
人员.Value = 人员.List(CInt(人员.Value) - 1)
Else
Cancel = True
End If
End If
End Sub