Printing certain pages within Active Sheets only

G

gtslabs

I have the following code to print certain page numbers for all the
sheets in my workbook.
Sub Print_All()
Dim sht As Variant
For Each sht In ThisWorkbook.Sheets
sht.PrintOut From:=1, To:=1, Copies:=1, Collate:=True
Next sht
End Sub

But how would I do the same for only the active or sheets selected with
my mouse?


The other problem I have is that there is not much difference in tab
color when I select sheets. Sometimes I make mistakes and type over in
other sheets because I could not tell that more than one was selected.
IS there a way to adjust the color of the tabs once they are selected?
I know I can change the tab colors but not sure if I can do that for
just selected tabs.
 
G

Guest

Sub Print_All()
Dim sht As Variant
For Each sht In ActiveWindow.SelectedSheets
sht.PrintOut From:=1, To:=1, Copies:=1, Collate:=True
Next sht
End Sub
 

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