以前作りその後使わなくなったマクロがあるのでメモとして残します。
Private Sub Workbook_BeforeClose(Cancel As Boolean)
res = MsgBox("開いたままにするか?(閉じるならば「いいえ」)", vbYesNo)
If res = vbYes Then
Cancel = True '"Cancel = True"ならば閉じない。
End If
End Sub
res = MsgBox("開いたままにするか?(閉じるならば「いいえ」)", vbYesNo)
If res = vbYes Then
Cancel = True '"Cancel = True"ならば閉じない。
End If
End Sub
コメント