求助,一个简单的问题,ComboBox1和时间判断,为什么不等于啊?
按键精灵吧
全部回复
仅看楼主
level 14
解决口粮 楼主
求助:ComboBox1和时间判断,h,s都是
11
, 为什么不等于啊?
//*******************************
Function 测试
Dim h,s
h = Hour(time)//时间
TracePrint "h等于" & h
索引 = Split(Form1.ComboBox1.List,"|") //获取ComboBox1
s = 索引(Form1.ComboBox1.ListIndex)
TracePrint "s等于" & s
If h = s Then
TracePrint "h等于s"
Else
TracePrint "h不等于s"
End If
End Function
Event Form1.Load
Form1.ComboBox1.List = "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24"
Form1.ComboBox1.ListIndex = 0
End Event
Call 测试
2023年11月25日 03点11分 1
level 14
解决口粮 楼主
是不是类型造成的,应该怎么修改
2023年11月25日 05点11分 2
1