作者nak54mn (大王頁)
看板Visual_Basic
標題[VBA ] 密碼登入問題
時間Mon Mar 23 00:33:41 2009
我剛學VBA
請問我想要密碼輸入錯誤或按取消時要回到第一個msgbox
要寫甚麼讓它回去阿?
Sub no4LOGIN()
Dim login As Integer
login = MsgBox("Please press OK if you remember your password. Otherwise,
press Cancel.", vbOKCancel )
If login = vbCancel Then
MsgBox "Please comtact Computer Center!"
Else
text1 = InputBox("Enter your password below")
If text1 = "12345" Then
MsgBox "Welcome"
Else
End If
End If
End Sub
我查我的課本也沒寫 先謝謝各位了!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.165.44.187
1F:→ MOONRAKER:看你課本迴圈的部份 03/23 01:53
2F:推 cutejay:省麻煩用 goto 吧 03/23 08:26
3F:→ MOONRAKER:要養成好習慣 03/23 09:46
4F:推 ClubT:用Do...Loop 03/23 14:40