View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Paul James Paul James is offline
external usenet poster
 
Posts: 11
Default correction

I need to correct something I said in my previous post here. The delete
method of the toolbars object needs to be located in the BeforeClose event
of the workbook, not the Auto_Close. This is the way to programmatically
get rid of the toolbar when the workbook to which it's attached isn't open.

Here's the code:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
On Error Resume Next
Application.CommandBars("TimesheetToCalStars").Del ete
End Sub

Sorry for any confusion.

Paul