[VBA ] 密碼登入問題

看板Visual_Basic作者 (大王頁)時間17年前 (2009/03/23 00:33), 編輯推噓2(202)
留言4則, 3人參與, 最新討論串1/1
我剛學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

03/23 01:53, , 1F
看你課本迴圈的部份
03/23 01:53, 1F

03/23 08:26, , 2F
省麻煩用 goto 吧
03/23 08:26, 2F

03/23 09:46, , 3F
要養成好習慣
03/23 09:46, 3F

03/23 14:40, , 4F
用Do...Loop
03/23 14:40, 4F
文章代碼(AID): #19ncXd1l (Visual_Basic)