Private Sub Workbook_Open()
Dim answer As Integer
Dim answer1 As Integer
answer = MsgBox("Please note that this file is a template for company use. No manual updates to this file should be saved on the public drive. Please select Yes to clear all manual pricing overrides (blue columns) to avoid formula errors. If you have saved a copy of this file to your own records, please disregard this message and select No to keep the information you have entered.", vbYesNo + vbQuestion, "Please Read")
If answer = vbYes Then
answer1 = MsgBox("Are you sure you want to clear the contents of the manual override columns?", vbYesNo + vbQuestion, "Please Read")
If answer1 = vbYes Then
ThisWorkbook.Sheets("BAPX CALCULATIONS").Range("AC7:AC5000,AF7:AF5000,AI7:AI5000,AL7:AL5000,AO7:AO5000,AR7:AR5000,AU7:AU5000,AX7:AX5000,BA7:BA5000,BD7:BD5000,BG7:BG5000,BJ7:BJ5000,BM7:BM5000,BP7:BP5000,BS7:BS5000,BV7:BV5000,BY7:BY5000,CB7:CB5000").Select
Selection.ClearContents
ThisWorkbook.Sheets("BAPX CALCULATIONS").Range("CB7:CB5000,CD7:CD5000,CF7:CF5000,CI7:CI5000,CL7:CL5000,CN7:CN5000,CP7:CP5000,CS7:CS5000,CU7:CU5000,CW7:CW5000,CZ7:CZ5000,DB7:DB5000,DD7:DD5000,DG7:DG5000,DI7:DI5000,DK7:DK5000,DN7:DN5000").Select
Selection.ClearContents
ThisWorkbook.Sheets("BAPX CALCULATIONS").Range("DP7:DP5000,DR7:DR5000,DU7:DU5000,DX7:DX5000,EA7:EA5000,ED7:ED50000").Select
Selection.ClearContents
End If
Else
End If
End Sub
Bookmarks