Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
how to kill excel using a vbscript
Hi Sofia
Things like these tend to happen when Excel asks for something or prompts something and no one responds to the message. See if XL.Visible = True -just below "createobject"- will reveal something. -- HTH. Best wishes Harald Excel MVP Followup to newsgroup only please. "Sofia" wrote in message ... Hello. I am running a vb script that essentially runs an Excel macro. The macro itself does not try to reopen the excel file. Rather it invokes an .exe which prints a set of labels. Everytime I run the script, I get a message from the system (after a few seconds) that the excel is file is available for editing. I've noticed that even though the script is setting the Excel object to nothing it still leaves an instance of Excel running. How do I kill that instances of Excel (or any other application) within my vb script? Here is my vb script: Dim XL Dim WB Set XL = CreateObject("Excel.Application") Set WB = XL.Workbooks.Open("C:\2dseismiclabels.xls") msgbox("about to print labels") xl.Run "Macro1" msgbox("finished printing labels") wb.save WB.Close XL.Quit Set WB = Nothing Set XL = Nothing |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
kill command and excel | Excel Discussion (Misc queries) | |||
Run VBScript from Excel | Excel Discussion (Misc queries) | |||
Writing Macros In VBScript | Excel Discussion (Misc queries) | |||
How do I kill the Research pane, other task panes in Excel | Setting up and Configuration of Excel |