![]() |
Print Code
Using 2007
The code gets hung up at Range("Print_Area").select ------------------------------------ Public Sub PrintYTD() ' ' Procedure to print Year To Date Sales report. ' ' Range("Print_Area").Select With ActiveSheet.PageSetup .Orientation = xlLandsacpe .FitToPagesWide = 1 .FitToPagesTall = 1 End With Selection.PrintOut Copies:=1 Range("F1").Select End Sub -- William<"M" |
Print Code
The error message reads
Select Method of Range Class Failed RunTime Error 1004 -- William<"M" "Sunday88310" wrote: Using 2007 The code gets hung up at Range("Print_Area").select ------------------------------------ Public Sub PrintYTD() ' ' Procedure to print Year To Date Sales report. ' ' Range("Print_Area").Select With ActiveSheet.PageSetup .Orientation = xlLandsacpe .FitToPagesWide = 1 .FitToPagesTall = 1 End With Selection.PrintOut Copies:=1 Range("F1").Select End Sub -- William<"M" |
Print Code
I found this web site address and found out what is causing
This problem. "Copying the sheet programmatically" http://support.microsoft.com/default.aspx/kb/210684 Thank you, anyone that may have been working on it.. -- William<"M" "Sunday88310" wrote: The error message reads Select Method of Range Class Failed RunTime Error 1004 -- William<"M" "Sunday88310" wrote: Using 2007 The code gets hung up at Range("Print_Area").select ------------------------------------ Public Sub PrintYTD() ' ' Procedure to print Year To Date Sales report. ' ' Range("Print_Area").Select With ActiveSheet.PageSetup .Orientation = xlLandsacpe .FitToPagesWide = 1 .FitToPagesTall = 1 End With Selection.PrintOut Copies:=1 Range("F1").Select End Sub -- William<"M" |
All times are GMT +1. The time now is 03:01 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com