View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Printing certain pages within Active Sheets only

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

--
Regards,
Tom Ogilvy


"gtslabs" wrote:

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.