Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Printing displayed sheets
After working with the user to limit the number of sheets displayed in a workbook (that includes 97 sheets) I would like to offer them the ability to print those sheets that are visible. Here is the code I have. It does select the sheets but I cannot print them. I have tried the printout syntax a million different ways but can't seem to get it to work. Sub Print_ActiveSheets_Macro() Sheets("Control").Select Dim ws As Worksheet For Each ws In Worksheets If ws.Visible Then ws.Select False Next ws msg = "You are printing the sheets selected below. " & vbCrLf msg = msg & "Do you want to continue?" response = MsgBox(msg, vbOKCancel + vbQuestion, "Print Alert") If response = vbOK Then ws.PrintOut ' For Each Worksheet In ws End Sub Thanks for your help --- ~~ Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cell borders are displayed but not printing or on print preview | Excel Discussion (Misc queries) | |||
Printing Sheets | Excel Discussion (Misc queries) | |||
PRINTING two sheets on ONE? | Excel Discussion (Misc queries) | |||
How to keep sheets displayed(arranged) when moving between them? | Excel Worksheet Functions | |||
Sheets not getting displayed | Excel Discussion (Misc queries) |