[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
题一
  1. Option Explicit
  2. Dim strMessage,title
  3. strMessage = "BBCC"
  4. title = "变量"
  5. MsgBox strMessage,67,title
复制代码
不知道合要求不...
1

评分人数

    • rat: 鼓励一下第一个答题的PB + 10

TOP

谢谢rat兄的指点,看来在变量方面要多加努力!

TOP

第二题
  1. Option Explicit
  2. Dim strMessage, strTitle
  3. strMessage = "Hello world!"
  4. strTitle = InputBox("Enter your name." ,strMessage)
  5. MsgBox strMessage,68,strTitle
复制代码

[ 本帖最后由 BBCC 于 2008-11-7 19:41 编辑 ]

TOP

ok!
养成一个好习惯很重要!

TOP

问问rat兄,第三第四题如何做?

TOP

题三是这样吗?
  1. Dim strDate
  2. strDate = "9,11,2008"
  3. strDate = cdate(strDate)
  4. strDate = cstr(strDate)
  5. msgbox(strDate)
复制代码

TOP

题四
  1. Option Explicit
  2. Dim strMessage, strTitle, strValue
  3. strMessage = "Hello world!"
  4. strTitle = InputBox("Enter your name." ,strMessage)
  5. strValue = VarType(MsgBox (strMessage,68,strTitle))
  6. MsgBox(strValue)
复制代码
看来vbs的变量类型很复杂

TOP

另外,第4题,不是输出MsgBox返回值的类型,而是输出返回值转换后的字符串

兄的意思是再通过cstr来转换变量类型?

TOP

是否这样改?
  1. strValue = cstr(VarType(MsgBox (strMessage,68,strTitle)))
复制代码

TOP

了解,谢谢兄的指导!

TOP

返回列表