Macros

L

Lois

I have recorded the following macro to select sheets of a workbook as a group
& view them in print preview, then return to normal view (this is the my boss
wanted to view them), is there any way to 'generalise' it so it can be used
in any workbook i.e. without listing tab names. also, his screen is quite
big but the document doesnt fill it in print preview, is there any way i can
get the document to fill the screen in print preview?

Sub Ken_Full_Screen_View()
'
' Ken_View Macro
' Macro recorded 01/04/2009 by lois
'

'
ActiveWindow.Zoom = 400
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets(Array("Cover Sheet", "FAULTS BY Nº", "FAULTS BY COST", "Summary",
"No 1", _
"No 2", "No 3", "No 4", "No 5", "No 6", "No 7", "No 8")).Select
Sheets("Cover Sheet").Activate
ActiveWindow.SelectedSheets.PrintPreview
End Sub

Sub Ken_Normal_View()
'
' Ken_Normal_View Macro
' Macro recorded 01/04/2009 by lois
'

'
Sheets("Cover Sheet").Select
ActiveWindow.Zoom = 100
End Sub
 
J

Jacob Skaria

The below will work for all workbooks. Active window Zoom will only zoom the
worksheet not the print preview screen.

Sub ViewAllSheets_PrintPreview()
ActiveWorkbook.Sheets.Select
ActiveWindow.SelectedSheets.PrintPreview
End Sub

If this post helps click Yes
 
L

Lois

Hi,
I have just tried the macro below, but it doesnt seem to like the
'ActiveWorkbook.Sheets.Select' bit!?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top