Dim Message, Title, Default, MyValue
Message = "Enter a value between 1 and 3"   ' Set prompt.
Title = "InputBox Demo"   ' Set title.
Default = "1"   ' Set default.
' Display message, title, and default value.
MyValue = InputBox(Message, Title, Default)' Use Helpfile and context. The Help button is added automatically.
MyValue = InputBox(Message, Title, , , , "DEMO.HLP", 10)' Display dialog box at position 100, 100.
MyValue = InputBox(Message, Title, Default, 100, 100)

解决方案 »

  1.   

    那么该如何判断inputbox对话框上按下的是哪个按纽呢,是ok还是cancel?
    麻烦再解释一下吧
      

  2.   

    这个没办法,只能通过MyValue的值,如果MyValue的值为空可能就是按了CANCEL或没有赋值
      

  3.   

    按下OK后,inputbox返回你输入的数据;按下cancel后,inputbox返回空串。你判断他按的是哪个按钮有嘛用。
      

  4.   

    这个没办法,只能通过MyValue的值,如果MyValue的值为空可能就是按了CANCEL或没有赋值