Private Sub Command1_Click()
On Error Resume Next
'判断是否输入了用户名
Dim k, I As Byte
Dim strTEXT As String
Dim strTEXT1() As String
strTEXT = Text1.Text & "," & Text2.Text & "," & Text3.Text
strTEXT1() = Split(strTEXT, ",")
For k = 0 To 3
If strTEXT1(k) = "" Then
MsgBox Split("设备,类型,班别", ",")(k) & "录入框为空,请重新输入!", 48, "提示"
Else
If strTEXT1(k) <> "" Then
MsgBox Split("设备,类型,班别", ",")(k) & "录入成功!", 48, "提示"
End If
End If
Next
End Sub
把Command1_Click代码改一下