K
Kathy
I've been displaying an Excel report in a browser window
via Java's getAppletContext().showDocument(url,"_blank")
with no problems. I then tried to do the same for
printing only after formatting I wanted to use the
following statements to print and exit out of Excel. The
problem is the application.quit is causing the macro to
run twice and give me two print outs. When I remove the
application.quit I get one print out but the browser
window stays open with my Excel report visible. Anyone
have any ideas as to why it's executing twice?
My code in Autpen is as follows:
Application.Visible = False
Application.WindowState = xlMinimized
Application.DisplayAlerts = False
Application.DefaultWebOptions.DownloadComponents =
False
Main <--- formats report
ActiveWorkbook.Saved = False
ActiveSheet.PrintOut
Application.Quit
via Java's getAppletContext().showDocument(url,"_blank")
with no problems. I then tried to do the same for
printing only after formatting I wanted to use the
following statements to print and exit out of Excel. The
problem is the application.quit is causing the macro to
run twice and give me two print outs. When I remove the
application.quit I get one print out but the browser
window stays open with my Excel report visible. Anyone
have any ideas as to why it's executing twice?
My code in Autpen is as follows:
Application.Visible = False
Application.WindowState = xlMinimized
Application.DisplayAlerts = False
Application.DefaultWebOptions.DownloadComponents =
False
Main <--- formats report
ActiveWorkbook.Saved = False
ActiveSheet.PrintOut
Application.Quit