dim p as integer'全局变量private sub command1_click()if text1="123456" thenmsgbox "通过"elsep=p+1text2=pmsgbox "密码错误 " & p & " 次"if p>3 thenmsgbox "密码错误超过 3 次!"endend ifend ifend sub