经济效益考核指标:msgbox prompt : ="密码无效",_ 那里错了 是不是符号错了?

来源:百度文库 编辑:中科新闻网 时间:2024/05/09 19:22:59
Option Explicit
Const password As String = "111"
Private Sub Form_Load()
Const max_logon_attenpts As Integer = 3
Static sintlogonattenpts As Integer
frmlogon.Show vbModal
Do Until frmlogon.Txtpassword.Text = password
sintlogonattempts = sintlogonattenpts + 1
If sintlogonattempts < max_logon_attempts Then
msgbox prompt : ="密码无效",_

msgbox prompt : ="密码无效",_
我这行那里出错了

MsgBox prompt:="密码无效"才对吧,
后面的",_"不知道你干吗用的。

msgbox "密码无效",vbononly

MsgBox prompt:="密码无效"才对吧,
后面的",_"不知道你干吗用的。
回答者:i777 - 经理 四级 1-17 17:36
这个很可能
如果不是的话
在msgbox上面按一下f1,看看msgbox的格式正确不

你只是想提示一下用户密码有错吧!你的那种错法我也没有看过。不过你也可以这样定代码:msgbox("密码错误!",36,"提示")
其中“36”是对话框的风格,及其对话框里出现的按键种类。我也没有怎么去学VB,我也就只知道这么一点点。

VB语言吗?