LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Need some help with a macro for printing selected sheets

Try replacing the below line with

<<Selection.PrintOut Copies:=1
Activewindow.SelectedSheets.PrintOut Copies:=1

OR try the below modified macro

Sub Print_range()
Dim Month As Variant
Set listRange = ThisWorkbook.Worksheets("Misc").Range("print_list" )
Month = InputBox("Enter Month as 3 letter first letter Capital: ")

Dim arrSheets As Variant, rngRange As Range
arrSheets = Array("Womens Heart", "Physical Med & Rehab", "Phys
Med-ARU&SNF", _
"Northwood", "Womens Health Ctr", "Forest Park", "Gyn &Birthing",
"Bariatric", _
"Regency", "55912", "Palo Alto", "Radiology")


Select Case Month
Case "": Exit Sub
Case "Jul"
Set rngRange = Columns("E:E")
Case "Aug":
Set rngRange = Columns("F:F")
Case "Sep":
Set rngRange = Columns("G:G")
End Select

For intTEmp = 0 To UBound(arrSheets)
Worksheets(CStr(arrSheets(intTEmp))).rngRange.Prin tOut Copies:=1
Next

End Sub
--
If this post helps click Yes
---------------
Jacob Skaria


"Constance" wrote:

I am not sure what I am missing in this macro but instead of printing all of
the worksheets that have been grouped, this only prints the active worksheet
in the group. Below is a portion of the code I am using:

Sub Print_range()
Dim Month As Variant
Set listRange = ThisWorkbook.Worksheets("Misc").Range("print_list" )
Month = InputBox("Enter Month as 3 letter first letter Capital: ")


Select Case Month
Case "": Exit Sub
Case "Jul": Sheets(Array("Womens Heart", "Physical Med & Rehab",
"Phys Med-ARU&SNF", _
"Northwood", "Womens Health Ctr", "Forest Park", "Gyn &
Birthing", "Bariatric", _
"Regency", "55912", "Palo Alto", "Radiology")).Select
Sheets("Womens Heart").Activate
Columns("E:E").Select
Selection.PrintOut Copies:=1
Case "Aug": Sheets(Array("Womens Heart", "Physical Med & Rehab",
"Phys Med-ARU&SNF", _
"Northwood", "Womens Health Ctr", "Forest Park", "Gyn &
Birthing", "Bariatric", _
"Regency", "55912", "Palo Alto", "Radiology")).Select
Sheets("Womens Heart").Activate
Columns("F:F").Select
Selection.PrintOut Copies:=1
Case "Sep": Sheets(Array("Womens Heart", "Physical Med & Rehab",
"Phys Med-ARU&SNF", _
"Northwood", "Womens Health Ctr", "Forest Park", "Gyn &
Birthing", "Bariatric", _
"Regency", "55912", "Palo Alto", "Radiology")).Select
Sheets("Womens Heart").Activate
Columns("G:G").Select
Selection.PrintOut Copies:=1
End Select
End Sub

Thanks for the help!
--
Constance

 
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 macro, selected rows only Matt G[_2_] Excel Programming 3 February 20th 09 03:16 PM
Printing selected sheets. Rafat Excel Worksheet Functions 1 June 9th 06 03:13 PM
printing selected sheets funkymonkUK[_179_] Excel Programming 4 June 7th 06 04:20 PM
Having trouble printing selected sheets in Excel lost in the world Excel Discussion (Misc queries) 1 April 26th 05 06:24 PM
printing selected sheets andy Excel Programming 2 December 8th 04 09:59 PM


All times are GMT +1. The time now is 02:24 AM.

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

About Us

"It's about Microsoft Excel"