阅读以下说明和Visual Basic 码,将应填入(n)处的字名写在的对应栏内
[说明] 这是一个用户名校验程序,如用户名正确,即输出欢迎字样,否则,弹出警告窗并直接退出程序。下面是实现上述功能的程序,请填空。“Option Explicit”此语句的作用:强制显示声明
Dim UserName (2) As String
Dim Flag As Boolean
(1)
Private Sub Form. _ Load()
UserName (0) = "AA": UserName (1) = "BB": UserName(2) = "CC"
Flag = False
inputName = InputBox(“请输入名称:“,”身份确认”“,”)
Dim i As Integer
For i = 0 To False
If inputName = UserName(i) Then
(2)
End If
Next i
If (3) Then
MsgBox “用户身份确失败!退出应用”, vbOKOnly, “警告”
End
End If
End Sub
Private Sub Form_ Paint()
(4)
End Sub