2009-11-05 6 views

답변

2
Sub PrintSheets() 
    Dim cell As Range 
    For Each cell In Sheet1.Range("A1:A10") '''(change this) 
    If cell.Offset(0, 1).Value <> "" Then 
     Sheets(cell.Value).PrintOut 
    End If 
    Next cell 
End Sub 
1

어떻게 인쇄 할 시트를 선택하기 위해 시트의 속성을 사용하는 방법에 대한.

탭 색상처럼 - 설정하기 쉽고 멋진 시각적 표시기입니다.

Sub PrintSheets() 
     Dim sb As String 
     sb = Application.StatusBar 
     If sb = "False" Then sb = "" 

     Dim ws As Worksheet 
     For Each ws In ActiveWorkbook.Worksheets 
      If 0 < ws.Tab.ColorIndex Then 
       Application.StatusBar = "Printing " & ws.Name & " ..." 
       ws.PrintOut 
      End If 
     Next 

     Application.StatusBar = sb 
End Sub 
관련 문제