需要实现效果
组合框里面有20行数据,现在需要双击组合框,组合框内数据会依次显示
代码示例 : (有兴趣可以改成函数)
Private Sub Combo0_DblClick(Cancel As Integer)
If ME.Combo0.ListCount < 1 Then Exit Sub '组合框行数小于1 退出过程
Dim I As Long
I = ME.Combo0.ListCount '获取组合框行数
If ME.Combo0.ListIndex < I - 1 Then ’如果不是最后一行数据
ME.Combo0.ListIndex = Combo0.ListIndex + 1
Else
ME.Combo0.ListIndex = 0
End If
End Sub