重置表单时出现奇怪的文本框错误?
getting an odd text box error when resetting form?
使用此代码(如下)重置用户表单中的所有字段:
Private Sub cmdReset_Click()
Dim iControl As Control
For Each iControl In Me.Controls
If iControl.Name Like "txt*" Then iControl = vbnullstring
If iControl.Name Like "cmb*" Then iControl = vbnullstring
Next
End Sub
我有一个文本框(已转换为 %)未重置,但显示如下:
-nan(ind)00.00%
知道如何防止这种情况并清除文本框吗?
Private Sub cmdReset_Click()
Dim iControl As Control
For Each iControl In Me.Controls
If iControl.Name Like "txt*" Then iControl = Null
If iControl.Name Like "cmb*" Then iControl = Null
Next
End Sub
使用此代码(如下)重置用户表单中的所有字段:
Private Sub cmdReset_Click()
Dim iControl As Control
For Each iControl In Me.Controls
If iControl.Name Like "txt*" Then iControl = vbnullstring
If iControl.Name Like "cmb*" Then iControl = vbnullstring
Next
End Sub
我有一个文本框(已转换为 %)未重置,但显示如下:
-nan(ind)00.00%
知道如何防止这种情况并清除文本框吗?
Private Sub cmdReset_Click()
Dim iControl As Control
For Each iControl In Me.Controls
If iControl.Name Like "txt*" Then iControl = Null
If iControl.Name Like "cmb*" Then iControl = Null
Next
End Sub