01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 |
|
Private Declare PtrSafe Function MessageBoxTimeoutA Lib "user32.dll" ( _
ByVal hWnd As LongPtr, _
ByVal lpText As String, _
ByVal lpCation As String, _
ByVal uType As Long, _
ByVal wLanguageId As Integer, _
ByVal dwMiliseconds As Long) As Long
Sub Workbook_BeforeClose(Cancel As Boolean)
If MessageBoxTimeoutA(Application.hWnd, _
"Archivieren nicht vergessen!!!", " A C H T U N G !", vbOKCancel Or vbExclamation, 0, 3000) = vbCancel Then
Cancel = True
End If
End Sub
Sub Workbook_BeforeClose(Cancel As Boolean)
If CreateObject("WScript.Shell").Popup( _
"Archivieren nicht vergessen!!!", 3, " A C H T U N G !", vbOKCancel Or vbExclamation) = vbCancel Then
Cancel = True
End If
End Sub
|