Hi everybody,
I've been looking since a long time to find what's going wrong, but can't find out what I'm doing wrong.
I want to disable the prompt when deleting sheets in my workbook, but I still get a prompt for deleting the sheets even if Application.DisplayAlerts = False is in my code.
Any suggestions how I can fix this ?
Thx !
This is my code:
Sub KopieerVorigePrestatiestaatTabblad()
Application.ScreenUpdating = False
Application.DisplayAlerts = False If FileExists = True Then
Set BR = Workbooks.Open(BRPath & BRName)
BR.Sheets(ControlPanel.ComboBoxMaand.Value).Copy Before:=Prestatiestaat.Sheets("Blad1")
BR.Close (False)
Prestatiestaat.Sheets("Blad1").Delete
Prestatiestaat.Sheets("Blad2").Delete
Prestatiestaat.Sheets("Blad3").Delete
Prestatiestaat.Sheets(ControlPanel.ComboBoxMaand.Value).Name = ControlPanel.ComboBoxMaand.Value & " (BASIS)" 'hernoem het tabblad
'BreakLinks 'Wordt in volgende stap gedaan
Else
MsgBox ("Kan prestatiestaat niet maken omdat bestand Basisrooster " & ControlPanel.ComboBoxAfdeling & " " & ControlPanel.ComboBoxJaartal & " niet kan gevonden worden.")
End
End If
Application.DisplayAlerts = True
End Sub
Bookmarks