Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Printing Selections from four sheets

I am trying to select data from four sheets and print the
selection. Here is the code I am trying to use. Even if I
take out the print code, the problem seems to be with
selecting anything on the second sheet, no matter which
sheet I make second. Could someone please tell me what
the problem is with my code?

Private Sub cmdPrintQtrReport_Click()
Application.ScreenUpdating = False
Sheets("DHS-Qtr").Visible = True
Sheets("DT-Qtr").Visible = True
Sheets("School-Qtr").Visible = True
Sheets("Parent-Qtr").Visible = True
Sheets("DHS-Qtr").Select
Range("A1").Select
Selection.CurrentRegion.Select
Selection.PrintOut
Range("A1").Select
Sheets("DT-Qtr").Select
Range("A1").Select
Selection.CurrentRegion.Select
Selection.Print
Range("A1").Select
Sheets("School-Qtr").Select
Range("A1").Select
Selection.CurrentRegion.Select
Selection.PrintOut
Range("A1").Select
Sheets("Parent-Qtr").Select
Range("A1").Select
Selection.CurrentRegion.Select
Selection.PrintOut
Range("A1").Select
Sheets("DHS-Qtr").Select
Range("A1").Select
Application.ScreenUpdating = True

End Sub

Thanks in advance,
Donna Brooks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Printing Selections from four sheets

Try this without selecting

Private Sub cmdPrintQtrReport_Click()
Application.ScreenUpdating = False

Sheets("DHS-Qtr").Visible = True
Sheets("DT-Qtr").Visible = True
Sheets("School-Qtr").Visible = True
Sheets("Parent-Qtr").Visible = True

Sheets("DHS-Qtr").Range("A1").CurrentRegion.PrintOut
Sheets("DT-Qtr").Range("A1").CurrentRegion.PrintOut
Sheets("School-Qtr").Range("A1").CurrentRegion.PrintOut
Sheets("DHS-Qtr").Range("A1").CurrentRegion.PrintOut
Application.ScreenUpdating = True
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Donna Brooks" wrote in message ...
I am trying to select data from four sheets and print the
selection. Here is the code I am trying to use. Even if I
take out the print code, the problem seems to be with
selecting anything on the second sheet, no matter which
sheet I make second. Could someone please tell me what
the problem is with my code?

Private Sub cmdPrintQtrReport_Click()
Application.ScreenUpdating = False
Sheets("DHS-Qtr").Visible = True
Sheets("DT-Qtr").Visible = True
Sheets("School-Qtr").Visible = True
Sheets("Parent-Qtr").Visible = True
Sheets("DHS-Qtr").Select
Range("A1").Select
Selection.CurrentRegion.Select
Selection.PrintOut
Range("A1").Select
Sheets("DT-Qtr").Select
Range("A1").Select
Selection.CurrentRegion.Select
Selection.Print
Range("A1").Select
Sheets("School-Qtr").Select
Range("A1").Select
Selection.CurrentRegion.Select
Selection.PrintOut
Range("A1").Select
Sheets("Parent-Qtr").Select
Range("A1").Select
Selection.CurrentRegion.Select
Selection.PrintOut
Range("A1").Select
Sheets("DHS-Qtr").Select
Range("A1").Select
Application.ScreenUpdating = True

End Sub

Thanks in advance,
Donna Brooks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Printing Selections from four sheets

Hi,


Try to change selection.print
to
Activesheet.PrintOut Copies:=1

Abdul Salam



-----Original Message-----
I am trying to select data from four sheets and print

the
selection. Here is the code I am trying to use. Even if

I
take out the print code, the problem seems to be with
selecting anything on the second sheet, no matter which
sheet I make second. Could someone please tell me what
the problem is with my code?

Private Sub cmdPrintQtrReport_Click()
Application.ScreenUpdating = False
Sheets("DHS-Qtr").Visible = True
Sheets("DT-Qtr").Visible = True
Sheets("School-Qtr").Visible = True
Sheets("Parent-Qtr").Visible = True
Sheets("DHS-Qtr").Select
Range("A1").Select
Selection.CurrentRegion.Select
Selection.PrintOut
Range("A1").Select
Sheets("DT-Qtr").Select
Range("A1").Select
Selection.CurrentRegion.Select
Selection.Print
Range("A1").Select
Sheets("School-Qtr").Select
Range("A1").Select
Selection.CurrentRegion.Select
Selection.PrintOut
Range("A1").Select
Sheets("Parent-Qtr").Select
Range("A1").Select
Selection.CurrentRegion.Select
Selection.PrintOut
Range("A1").Select
Sheets("DHS-Qtr").Select
Range("A1").Select
Application.ScreenUpdating = True

End Sub

Thanks in advance,
Donna Brooks
.

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
Printing XL Sheets name Muhammad Rizwan Khan - XL Sheets Name Excel Discussion (Misc queries) 1 February 19th 08 08:23 AM
How do I copy and move selections of data to other sheets? JEZ838 Excel Worksheet Functions 1 November 3rd 06 03:38 PM
PRINTING two sheets on ONE? Fecozisk Excel Discussion (Misc queries) 3 August 31st 06 04:49 AM
Printing non-adjacent selections BJ Gates New Users to Excel 3 February 4th 06 08:37 PM
Printing selections from sheets to PDF Mark McCall Excel Programming 0 July 28th 03 01:55 PM


All times are GMT +1. The time now is 09:21 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"