code that might be causing error - please review and comment
below are sections of code that might me causing my error when I close excel
THIS IS IN MY WORKBOOK MODUL
Private Sub Workbook_BeforeClose(Cancel As Boolean
Call DeleteMenuBa
End Su
FOLLOWING ARE PORTIONS OF MY MENU MODULE RELATED TO DELETING THE MENU BAR AND THE WORKBOOK_BEFORE CLOSE COD
' Delete menu bar if it exist
Call DeleteMenuBa
' Add a new menu ite
Set NewItem = NewMenu.Controls.Add(Type:=msoControlButton
With NewIte
.Caption = "&Restore Normal Menu
.OnAction = "DeleteMenuBar
End Wit
End Su
Sub DeleteMenuBar(
On Error Resume Nex
CommandBars("MyMenuBar").Delet
On Error GoTo
End Su
please advise if you can see if any of this code could be causing an error to occur when i try to close my excel file without saving (X in top right corner) or attempting to "save as
Thanks
|