3 回答
TA贡献1829条经验 获得超13个赞
Dim objWord,colTasks,strName
strName = "我的电脑"
Set objWord = CreateObject("Word.Application")
Set colTasks = objWord.Tasks
If colTasks.Exists(strName) Then colTasks(strName).Close
objWord.Quit
我认为:
两个set语句要写在两行上
if then在一行的不需要end if
TA贡献1844条经验 获得超8个赞
vbs语句未结束解决方法:
Dim msg
msg = MsgBox("你的电脑遭病毒破坏,是否尝试修复?" ,vbYesNo,"WINDOWS安全警报")
If msg = 6 Then--表示选择是
语句块1
Else
语句块2
End if
TA贡献1966条经验 获得超4个赞
Dim fsoTest As New FileSystemObject
Dim drv1 As Drive,sReturn As String
Set drv1 = fsoTest.GetDrive(“C:\")
sReturn = “Drive " & “C:\" & vbCrLf
sReturn = sReturn & “VolumeName" & drv1.VolumeName & vbCrLf
sReturn = sReturn & “Total Space: " & FormatNumber(drv1.TotalSize / 1024,0)
sReturn = sReturn & “Kb" & vbCrLf
sReturn = sReturn & “Free Space: " & FormatNumber(drv1.FreeSpace / 1024,0)
sReturn = sReturn &;“Kb" & vbCrLf
sReturn = sReturn &;“FileSystem:" & drv1.FileSystem & vbCrLf
MsgBox sReturn
添加回答
举报