Sub PrintSheets()
Dim i As Integer
Dim sht As Worksheet
Dim pdfPath As String
Dim bolSkipK As Boolean, bolSkipL As Boolean
pdfPath = ThisWorkbook.Path & "\"
If UCase(Range("K10")) = "ON" Then
For i = 4 To 9
' Set sht = Range("M" & i)
' sht.ExportAsFixedFormat Type:=xlTypePDF, fileName:=pdfPath, Quality:=xlQualityStandard
MsgBox Range("M" & i)
Next
bolSkipK = True
End If
If UCase(Range("L10")) = "ON" Then
For i = 4 To 9
' Set sht = Range("N" & i)
' sht.ExportAsFixedFormat Type:=xlTypePDF, fileName:=pdfPath, Quality:=xlQualityStandard
MsgBox Range("N" & i)
Next
bolSkipL = True
End If
If Not bolSkipK Then
For i = 4 To 9
If UCase(Range("K" & i)) = "ON" Then
' Set sht = Range("K" & i).Offset(0, 2)
' sht.ExportAsFixedFormat Type:=xlTypePDF, fileName:=pdfPath, Quality:=xlQualityStandard
MsgBox Range("K" & i).Offset(0, 2)
End If
Next
End If
If Not bolSkipL Then
For i = 4 To 9
If UCase(Range("L" & i)) = "ON" Then
' Set sht = Range("L" & i).Offset(0, 2)
' sht.ExportAsFixedFormat Type:=xlTypePDF, fileName:=pdfPath, Quality:=xlQualityStandard
MsgBox Range("L" & i).Offset(0, 2)
End If
Next
End If
Set sht = Nothing
End Sub