ich möchte in einem AddInn das speichern von allen Dateien abfangen, ähnlich
wie man eine Tastenkombination abfängt...
Für eine Idee wäre ich sehr dankbar.
Gruß
F. F.
Private Sub App_WorkbookBeforeSave(ByVal Wb As Workbook, _
ByVal SaveAsUI As Boolean, Cancel as Boolean)
a = MsgBox("Do you really want to save the workbook?", vbYesNo)
If a = vbNo Then Cancel = True
End Sub
Gruß,Option Explicit
Public WithEvents App As Excel.Application
Private Sub App_WorkbookBeforeSave(ByVal Wb As Workbook, ByVal SaveAsUI As Boolean, Cancel As _
Boolean)
Cancel=True
Msgbox wb.name &vblf &"wurde NICHT gespeichert"
End Sub
In einem Standardmodul, Modul1 o.ä. brauchst du
Option Explicit
Public WithEvents App As Excel.Application
Im Modul DieseArbeitsmappe dann dies
Option Explicit
Private Sub Workbook_Open()
Set App = Application
End Sub
Das ist ein Grundgerüst was theoretisch funktioniert. Praktisch leider nicht, bin da nicht so fit mit