I'm trying to close the CMD after running my vbs file, can someone help me?
Code:
Code:
Rich (BB code):
Dim objExcel, ObjWB
WScript.Sleep (200)
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set ObjWB = ObjExcel.Workbooks.Open("D:\Users\AFCALME\Documents\Projeto_Luis\Andre\EEC\QEIM\QEIM_geral\Teste_Def.xlsm", , True)
ObjWB.Saved = True
ObjWB.Close
objExcel.DisplayAlerts = False
Set objWorkbook = Nothing
Set objExcel = Nothing