MsgBox "登陆成功," & text1.text & "欢迎您!", 48, "欢迎进入"
不用引号引起变量``用& 连接字符
先定义a
Dim a As String
Private Sub Command1_Click()
......
End Sub
Private Sub Form_Click()
a = Int(Rnd * (999 - 100 + 1) + 100)
......
End Sub
msgbox a & b & c & d & e
msgbox "a:" & a & vbcrlf _
"b:" & b & vbcrlf _
"c:" & c & vbcrlf _
"d:" & d & vbcrlf _
"e:" & e
msgbox a & b & c & d & e & f