Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using BeforeClose for deleting a custom toolbar
Thanks for the posts. Using the method you suggest, the toolbar is
deleted even if the user chooses Cancel when prompted to Save. The workbook must only delete the toolbar if Cancel has not been pressed in the Save dialog. (This is why I was trying to use a variable itsclsing). Any further suggestions would be appreciated. Thanks, David --- Message posted from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using BeforeClose for deleting a custom toolbar
But your code was in the BeforeClose event, not BeforeSave.Why would you not
want the toolbar deleted when closing the workbook just because the user chose not to save it? -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "daithimcc " wrote in message ... Thanks for the posts. Using the method you suggest, the toolbar is deleted even if the user chooses Cancel when prompted to Save. The workbook must only delete the toolbar if Cancel has not been pressed in the Save dialog. (This is why I was trying to use a variable itsclsing). Any further suggestions would be appreciated. Thanks, David --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using BeforeClose for deleting a custom toolbar
If the user attempts to close the workbook without having saved changes,
the Before_Close code executes, then s/he is prompted to save. If the user chooses cancel, then the workbook is left open, but the toolbar is already deleted. I've seen a number of workarounds, but AFAIK, there's no bulletproof way to deal with this on a Workbook level. The Before_Close event is the first event fired. The Save dialog fires after the Before_Close macro has executed. In article , "Bob Phillips" wrote: But your code was in the BeforeClose event, not BeforeSave.Why would you not want the toolbar deleted when closing the workbook just because the user chose not to save it? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using BeforeClose for deleting a custom toolbar
When you choose close (beforeclose fires+you delete your toolbar), you
are asked if you want to save. When you choose Cancel, not only does it not save but it also cancels the close. So, the workbook stays open, but because beforeclose has already fired, you have already deleted the toolbar (not the desired behaviour). --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA custom toolbar | Excel Discussion (Misc queries) | |||
Problem Deleting Check Boxes created from Forms Toolbar | Excel Discussion (Misc queries) | |||
Custom toolbar in C# | Excel Programming | |||
Custom Toolbar | Excel Programming | |||
saving toolbar buttons on custom toolbar | Excel Programming |