Can't get that to work Sam - Dialog box still contains Cancel:- full code as
follows:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveWorkbook.Unprotect
Application.ScreenUpdating = False
Application.EnableEvents = False
Sheets("Current Round").Unprotect Password:=""
Sheets("Current Round Detailed").Unprotect Password:=""
Sheets("Current Round Graph").Unprotect Password:=""
Sheets("Home Graphs").Unprotect Password:=""
Sheets("Home Detailed Graphs").Unprotect Password:=""
Sheets("All Rounds").Unprotect Password:=""
Sheets("View Rounds").Unprotect Password:=""
Sheets("Search Rounds").Unprotect Password:=""
'Sheets("LogGraph3").Unprotect Password:=""
Dim wksht As Worksheet
With Application
.DisplayFormulaBar = True
.CommandBars("Worksheet Menu Bar").Enabled = True
.CommandBars("Standard").Visible = True
.CommandBars("Formatting").Visible = True
.CommandBars("Drawing").Visible = True
End With
For Each wksht In Worksheets(Array("Current Round", "Current Round
Detailed", _
"Current Round Graph", "Home Detailed Graphs", "Home Graphs", "All
Rounds", "View Rounds", "Search Rounds"))
wksht.Activate
ActiveWindow.DisplayHeadings = True
Next
Sheets("Current Round").Visible = False
Sheets("Current Round Detailed").Visible = False
Sheets("Current Round Graph").Visible = False
Sheets("Home Graphs").Visible = False
Sheets("Home Detailed Graphs").Visible = False
Sheets("All Rounds").Visible = False
Sheets("LogGraph3").Visible = True
Sheets("View Rounds").Visible = False
Sheets("Search Rounds").Visible = False
Sheets("RecordOfRounds").Visible = xlSheetVeryHidden
Sheets("RecordOfRoundsDetailed").Visible = xlSheetVeryHidden
Sheets("HomeCourse").Visible = xlSheetVeryHidden
Sheets("HomeDetailed").Visible = xlSheetVeryHidden
Sheets("LogGraph1").Visible = xlSheetVeryHidden
Sheets("LogGraph2").Visible = xlSheetVeryHidden
'Sheets("LogGraph3").Visible = xlSheetVeryHidden
Sheets("LogGraph4").Visible = xlSheetVeryHidden
Sheets("LogGraph5").Visible = xlSheetVeryHidden
Sheets("LogGraph6").Visible = xlSheetVeryHidden
Sheets("LogGraph7").Visible = xlSheetVeryHidden
Sheets("SearchRoundsData").Visible = xlSheetVeryHidden
Sheets("SearchRoundsDataDetailed").Visible = xlSheetVeryHidden
Sheets("SearchDataFiltered").Visible = xlSheetVeryHidden
Sheets("SearchDataFilteredDetailed").Visible = xlSheetVeryHidden
Sheets("LogGraph3").Protect Password:=""
Application.ScreenUpdating = True
Application.EnableEvents = True
ActiveWorkbook.Protect Structure:=True, Windows:=False
Application.DisplayAlerts = False
End Sub
Sandy