vbs 语句未结束

Dim objWord,colTasks,strName

strName = "我的电脑"

Set objWord = CreateObject("Word.Application") Set colTasks = objWord.Tasks 

If colTasks.Exists(strName) Then colTasks(strName).Close End If 

objWord.Quit
行:5
字符: 48
错误: 语句未结束
代码: 800A0401
源: Mircosoft VBScript 编译器错误
真找不出哪有错 哪位高手说一下
谢谢!

PIPIONE
浏览 2589回答 3
3回答

烙印99

Dim objWord,colTasks,strNamestrName = "我的电脑"Set objWord = CreateObject("Word.Application")Set colTasks = objWord.TasksIf colTasks.Exists(strName) Then colTasks(strName).CloseobjWord.Quit我认为:两个set语句要写在两行上if then在一行的不需要end if

婷婷同学_

vbs语句未结束解决方法:Dim msgmsg = MsgBox("你的电脑遭病毒破坏,是否尝试修复?" ,vbYesNo,"WINDOWS安全警报")If msg = 6 Then--表示选择是语句块1Else语句块2End if 

慕标5832272

Dim fsoTest As New FileSystemObjectDim drv1 As Drive,sReturn As StringSet drv1 = fsoTest.GetDrive(“C:\")sReturn = “Drive " & “C:\" & vbCrLfsReturn = sReturn & “VolumeName" & drv1.VolumeName & vbCrLfsReturn = sReturn & “Total Space: " & FormatNumber(drv1.TotalSize / 1024,0)sReturn = sReturn & “Kb" & vbCrLfsReturn = sReturn & “Free Space: " & FormatNumber(drv1.FreeSpace / 1024,0)sReturn = sReturn &;“Kb" & vbCrLfsReturn = sReturn &;“FileSystem:" & drv1.FileSystem & vbCrLfMsgBox sReturn
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript