Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA custom toolbar donwb Excel Discussion (Misc queries) 3 January 22nd 10 05:30 PM
Problem Deleting Check Boxes created from Forms Toolbar Suzan Excel Discussion (Misc queries) 4 September 15th 05 06:30 PM
Custom toolbar in C# Matt Excel Programming 0 January 16th 04 05:01 PM
Custom Toolbar Tom Ulincy[_2_] Excel Programming 1 December 13th 03 01:28 AM
saving toolbar buttons on custom toolbar Paul James Excel Programming 12 August 6th 03 08:28 AM


All times are GMT +1. The time now is 06:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"