Dim feedback As Integer
Dim password As String
L1: password = InputBox$("請輸入密碼", "密碼驗證")
If password = 15719 Then
MsgBox "歡迎使用密碼程式", vbOKOnly vbInformation, "驗證正確"
Else
feedback = MsgBox("密碼錯誤", 2 vbCritical)
Select Case feedback
Case vbAbort
End
Case vbRetry
GoTo L1
Case vbIgnore
MsgBox "您必須輸入密碼", vbOKOnly 48, "Error"
End Select
End If
--------------------------------------------------------------------------
我想請問一下如果讓Inputbox裡面可以有空字串或是其他文字
每次電腦都顯示型態不符耶!!
要怎麼弄?
2005-12-06 16:40:28 · 1 個解答 · 發問者 Anonymous in 電腦與網際網路 ➔ 程式設計
將If password = 15719 Then 改成 If password = "15719" Then 看看
2005-12-06 17:27:17 · answer #1 · answered by W.J.S. 7 · 0⤊ 0⤋