ⓒ 2025 AI교육연구회 withseok. All rights reserved. (위드석)
[블로그 글 내용 상업적 이용금지] 위드석홈 | 위드석개발 | AI교육연구회

 

 

 

미리 보기 화면 실행
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

320x100

+ Recent posts