Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Please HELP!
When I first call the code below in a macro from another spreadsheet, the execution halts at the €˜SelectedSheets.PrintOut line. I have to close down EXCEL using the Windows task manager. After I clear all instances of EXCEL from the window task manager, the macros works. It successfully prints the submitted spreadsheet as long as I continue to execute the macro within 20 minutes of the last execution. Im certain that it halts at the €˜SelectedSheets.PrintOut line because when I comment out the PrintOut line the macro runs through with no errors. Ive also tried to catch the error at the €˜PrintOut line but the system never throws one. Ive also tried to change the default printer but the same results exist. Sub print_48(fname As String) ' Disable the GUI Alerts Application.DisplayAlerts = False Application.EnableEvents = False Application.AskToUpdateLinks = False Application.AlertBeforeOverwriting = False Application.FeatureInstall = msoFeatureInstallNone Workbooks.Open Filename:=fname, ReadOnly:=True 'Print Sheet ' this line causes an error ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True ActiveWindow.Close End Sub Your assistance will be greatly appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
PrintOut problem | Excel Programming | |||
Problem with PrintOut Method | Excel Programming | |||
Printout Code Problem | Excel Programming | |||
ActiveSheet.PrintOut - problem | Excel Programming |