![]() |
Using Application.quit is causing my macro to run and print twice...
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 Auto_Open 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 |
All times are GMT +1. The time now is 10:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com