Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable or hide Cancel button on Save dialog box
How do I hide or disable the cancel button on the normal "Do you want to
save the changes etc......" dialog box. I presume code would be inserted into the "Workbook_BeforeClose(Cancel As Boolean)" module. TIA Sandy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable or hide Cancel button on Save dialog box
application.displayalerts = false "Sandy" wrote: How do I hide or disable the cancel button on the normal "Do you want to save the changes etc......" dialog box. I presume code would be inserted into the "Workbook_BeforeClose(Cancel As Boolean)" module. TIA Sandy |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable or hide Cancel button on Save dialog box
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 Structu=True, Windows:=False Application.DisplayAlerts = False End Sub Sandy "Sam Wilson" wrote in message ... application.displayalerts = false "Sandy" wrote: How do I hide or disable the cancel button on the normal "Do you want to save the changes etc......" dialog box. I presume code would be inserted into the "Workbook_BeforeClose(Cancel As Boolean)" module. TIA Sandy |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disable or hide Cancel button on Save dialog box
You can not modify the dialog boxes that pop up. The only thing you could do
would be to pre-empt it showing up in the first place. Then you can display your own form which can look however you want it to... In the before close event check the saved property. If it is false then you will need to handle the saving of the file. -- HTH... Jim Thomlinson "Sandy" wrote: How do I hide or disable the cancel button on the normal "Do you want to save the changes etc......" dialog box. I presume code would be inserted into the "Workbook_BeforeClose(Cancel As Boolean)" module. TIA Sandy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cancel save dialog box | Excel Programming | |||
Cancel Button on file save | Excel Programming | |||
disable save as dialog box | Excel Programming | |||
Print Dialog Cancel Button | Excel Programming | |||
Disable Cancel button | Excel Programming |