菜鸟学VB,请教一个变量赋值的问题
想获取Text1.text中的数值,设置了一个整形的全局变量psd,但是执行下来该变量值始终是‘0’“
Public psd As Integer
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
psd = Val(Text1.Text)
End If
End Sub
”
请问哪里出错了嘛?
谢谢
2013-01-21 09:34
程序代码:
Public psd As Integer
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then '打完字要按Enter
psd = Val(Text1.Text)
End If
'MsgBox psd
End Sub

2013-01-21 10:05
2013-01-21 10:31
2013-01-21 10:36

2013-01-21 11:03
2013-01-21 14:59
2013-01-21 20:42
2013-01-21 20:43