If I want to select all the worksheets in a workbook to print preview, what code should I use.Thanks
Something likeSheets(Array("Sheet17", "Sheet16", "Sheet15", "Sheet14", "Sheet13", "Sheet12", "Sheet11", "Sheet10")).SelectActiveWindow.SelectedSheets.PrintPreview
The trouble is I don't know how many sheets there are in the workbook, since it is a database, so I wanted to try and select all without naming all the sheets in an array. Any code like select all sheets?
Yep - just thought of it :o)
This even better as it avoids Selecting altogether and is one less line of code:ThisWorkbook.Worksheets.PrintPreview
This thread is now locked and can not be replied to.
OnePlus 5 review
See the work of famous artists playing with toys
iPad Pro 10.5in (2017) review
Comment faire une capture d’écran sur un Mac ?
© Copyright 2017 IDG UK. All Rights Reserved.