起码的逻辑:Private Sub Form_Click()
Dim username As String
username = InputBox("please write your name!")
Dim flag As Boolean
Dim i As Integer flag=false For i = 1 To users.Count
If username = users(i) Then
flag = True
MsgBox "you are welcome!"
exit sub
End If
Next i If flag = False Then
MsgBox "there is not the user"
End IfEnd Sub
Dim username As String
username = InputBox("please write your name!")
Dim flag As Boolean
Dim i As Integer flag=false For i = 1 To users.Count
If username = users(i) Then
flag = True
MsgBox "you are welcome!"
exit sub
End If
Next i If flag = False Then
MsgBox "there is not the user"
End IfEnd Sub
解决方案 »
- 先GetWindow,FindWindow得到句柄myhwnd后Showwindow myhwnd与直接ShowWindow Me.hwnd的区别
- VsflexGrid如何处理右键消息?
- 紧急求助:在线等.
- 关于VB shell()函数的效率
- 十万火急,高分求教,100分等你拿
- 救救我吧!!!!调用动态连接库,其中的函数在VB里面怎么声明啊
- 如何知道我生成的TXT文件有没有重复名称啊?
- FTP上传的问题?
- 如何枚举窗体上的控件,并判断其类型?
- 一个关系到小弟是否下岗的问题,望高手指点...
- MSHFlexGrid结合ComboBox的问题,在线等,多谢!
- 请好心人帮忙解决一下阿,偶,新手一个,谢谢le
Dim username As String
username = InputBox("please write your name!")
Dim flag As Boolean
Dim i As Integer
For i = 1 To users.Count
If username = users(i) Then
flag = True
exit for
end if
Next i
If flag then
MsgBox "you are welcome!"
Else
MsgBox "there is not the user"
End If
End Sub