kurze Frage, was mache ich falsch? Ich möchte beim speichern das verschiedene Makros ausgeführt werden, sobald "active" in der entsprechenden Zelle steht. Aber irgendie klappt es nicht.
Vielen Dank im voraus.
Gruss
Andre
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If MsgBox("Do you really want to save", vbYesNo, ActiveWorkbook.Name) = vbYes Then
If (Setupentry.Range("B09")) = "active" Then
Run "categoryfulfillment"
Run "regionsfulfillment"
Run "KPI"
If (Setupentry.Range("B10")) = "active" Then
Run "countmeasures"
If (Setupentry.Range("B11")) = "active" Then
Run "uniquekey"
If (Setupentry.Range("B12")) = "active" Then
Run "riskcalculationforsavings"
If (Setupentry.Range("B13")) = "active" Then
Run "checkforreporting"
Application.StatusBar = ActiveWorkbook.Name & " is saves with changes"
Else
Cancel = True
End If
End If
End If
End If
End If
End If
End Sub