#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 103
Default 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"


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 103
Default 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"


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 103
Default 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"


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code to Print Pages [email protected] Excel Discussion (Misc queries) 1 May 3rd 07 03:37 PM
Print Code Chey Excel Discussion (Misc queries) 1 April 13th 07 08:18 PM
Print routine needed for code pano Excel Worksheet Functions 3 February 11th 07 02:27 PM
Leading zero in zip code won't print J Mac Excel Discussion (Misc queries) 7 September 1st 05 12:07 AM
Code for Print Layout Phil Osman Excel Discussion (Misc queries) 1 March 31st 05 06:18 AM


All times are GMT +1. The time now is 09:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"