Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am currently opening excel from a java application. I use the excel object
(this workbook) to run several macros. The java application opens excel, so every time excel is opened, some code must be run and then excel must be close. The code I am trying to use is: Private Sub Workbook_Open() Macro1 tbmfile = "C:\excelfile.xls" tbmxcelfile = "excelfile" Windows(tbmxcelfile).Activate ActiveWorkbook.Save Application.Quit If I step through this code it works fine and closes excel. But when I open excelfile.xls from my documents, the macros are triggered to run, but excel does not close. Why is that? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Code for closing excel... | Excel Programming | |||
Prevent running macro upon closing Excel | Excel Programming | |||
Closing excel with a macro | Excel Programming | |||
Closing Excel from a Macro | Excel Programming | |||
Closing Excel down with a macro? | Excel Programming |