View Single Post
 
Old 04-17-2017, 09:16 AM
Logit Logit is offline Windows 10 Office 2007
Expert
 
Join Date: Jan 2017
Posts: 587
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

Paste this into a routine module, call with Command Button :

Code:
Option Explicit

Sub ClearPrint(WorksheetName)
    Application.DisplayAlerts = False
    Sheets("Sheet1").Copy After:=Sheets(3)
    With Sheets(1).Cells.Interior
        .Pattern = xlNone
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With
    Sheets(1).PrintOut
      
    Sheets("Sheet1").Delete
    ActiveSheet.Name = "Sheet1"
   
Dim i As Integer
Dim j As Integer

    For i = 1 To Sheets.Count
          For j = 1 To Sheets.Count - 1
                If UCase$(Sheets(j).Name) > UCase$(Sheets(j + 1).Name) Then
                   Sheets(j).Move After:=Sheets(j + 1)
                End If
          Next j
    Next i
    Sheets("Sheet1").Select
    Range("A1").Select
   Application.DisplayAlerts = True
End Sub

Sub prnt()
    ClearPrint "Sheet 1"
End Sub
The code is set for Sheet 1 Range A1:F18 .... edit as required.
Attached Files
File Type: xlsm Print BW.xlsm (20.4 KB, 13 views)
Reply With Quote