'목록하단 광고 치환자(withSeok)

 

 

 

미리 보기 화면 실행
Private Sub Worksheet_Change(ByVal Target As Range)

    If Target.Address = "A1" Then
        ActiveWindow.SelectedSheets.PrintOut preview:=True
    End If

End Sub
미리 보기 없이 바로 출력
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim KeyCells As Range

    ' The variable KeyCells contains the cells that will
    ' cause an alert when they are changed.
Set KeyCells = Range("A1")

If Not Application.Intersect(KeyCells, Range(Target.Address)) _
           Is Nothing Then

    ' Display a message when one of the designated cells has been
    ' changed.
    ' Place your code here.
        Range("C1").CurrentRegion.Select
        Selection.PrintOut From:=1, To:=1, Preview:=False

End If
End Sub

728x90

+ Recent posts