반응형

Private Sub Workbook_BeforeClose(Cancel As Boolean)
    If MsgBox("정말 닫으시겠습니까?", vbYesNo) = vbNo Then
        MsgBox "닫기를 취소합니다."
        Cancel = True
    End If
End Sub

 


Private Sub Workbook_Open()
    MsgBox "안녕하세요. 반갑습니다."
End Sub

반응형

'VBA' 카테고리의 다른 글

With문  (0) 2022.02.24
UserForm  (0) 2022.02.23
Clear, ClearContents, Delete  (0) 2022.02.22
MsgBox, InputBox  (0) 2022.02.21
전체복사, 값만복사, 수식만복사, 서식만복사  (0) 2022.02.21

+ Recent posts