能举一个例子吗

解决方案 »

  1.   

    dim a as integer
    a =100
    msgbox cstr(a)就这样,加油!
      

  2.   

    可以呀.
    dim abc as string
    abc="ccccccccccccccc"
    msgbox abc
      

  3.   

    本示例使用 MsgBox 函数,在具有“是”及“否”按钮的对话框中显示一条严重错误信息。示例中的缺省按钮为“否”,MsgBox 函数的返回值视用户按哪一个钮而定。本示例假设 DEMO.HLP 为一帮助文件,其中有一个内容代码为 1000。Dim Msg, Style, Title, Help, Ctxt, Response, MyString
    Msg = "Do you want to continue ?"   ' 定义信息。
    Style = vbYesNo + vbCritical + vbDefaultButton2   ' 定义按钮。
    Title = "MsgBox Demonstration"   ' 定义标题。
    Help = "DEMO.HLP"   ' 定义帮助文件。
    Ctxt = 1000   ' 定义标题 
          ' 上下文。
          ' 显示信息。
    Response = MsgBox(Msg, Style, Title, Help, Ctxt)
    If Response = vbYes Then   ' 用户按下“是”。
       MyString = "Yes"   ' 完成某操作。
    Else   ' 用户按下“否”。
       MyString = "No"   ' 完成某操作。
    End If
      

  4.   

    Const a = "lxcc"
    Private Sub Command1_Click()
        MsgBox a
    End Sub
      

  5.   

    可以的
    例:
     Private Sub Form_Load()
     dim i as integer
     i=100
     msgbox i 
     end sub