请大家帮忙!
Public Function Emptystring(ByVal con As TextBox) As Boolean
If Trim(con.Text) = "" Then
Emptystring = True
End If
End Function
我在含有12个textbox控件,是textbox数组控件.
我想在前6个控件判断它的text是否为空.
For i = 0 To 6 Step 1
If Emptystring(a2_txtcom(i)) Then
MsgBox "带有*号的填写项不能为空!", vbOKOnly, "出错提示"
Exit Sub
End If
Next
可是前6个控件已不为空,却一直出现提示.为什么?