
麻煩問下該怎么寫
除了用一條一條寫的方法
還有哪種方法可以顯示剩余輸入密碼的次數。
uj5u.com熱心網友回復:
private sub command1_click()
dim txtpwd as string
txtpwd = "000000"
static a as integer
if text1.text <> txtpwd then
a = a + 1
text1.text = ""
msgbox "密碼輸入錯誤" & a & "次,請重新輸入.",0,"提示"
if a = 3 then
msgbox "密碼錯誤次數過多",0,"提示"
unload me
end if
else
me.hide
form1.show
end if
end sub
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/23437.html
標籤:VB基礎類
下一篇:VBA setupapi.dll里面SetupDiEnumDeviceInterfaces函式在office365回傳錯誤
