Excel精英培训网

 找回密码
 注册
数据透视表40+个常用小技巧,让你一次学会!
查看: 1307|回复: 0

求助--381无效的属性数组索引

[复制链接]
发表于 2012-5-22 21:30 | 显示全部楼层 |阅读模式
当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
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|Excel精英培训 ( 豫ICP备11015029号 )

GMT+8, 2024-9-20 12:54 , Processed in 0.466033 second(s), 9 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表