LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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
 
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
What's causing error message? Jim Tibbetts Excel Worksheet Functions 4 November 12th 08 06:13 PM
What does Show Ink in Excel, Review Tab, comment, do? E. Duke 462 Excel Worksheet Functions 0 August 8th 08 04:31 PM
Halt Rest of Macro after Error €“ Jim Cone review Jenny B. Excel Discussion (Misc queries) 2 January 12th 08 03:11 AM
VB6 with Excel Objects: Please review my code Kurt Remlin Excel Programming 6 May 1st 04 03:36 AM
ChartCalculate code causing error when saving workbook Pete McCosh[_5_] Excel Programming 0 February 19th 04 03:00 PM


All times are GMT +1. The time now is 07:11 PM.

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

About Us

"It's about Microsoft Excel"