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: 20
Default Addin Close problem

I have an addin which creates its' own menu item on loading, and deletes it
on closing, but an error is raised when I shut excel down.

So I set a break point at the start of the following code:

Sub RemoveBofQ_UtilitiesMenu()
' This sub should be executed when the workbook is 'closed
' Deletes the Menus
Dim MenuSheet As Worksheet
Dim Row As Integer, Caption As String

On Error Resume Next
Set MenuSheet = ThisWorkbook.Sheets _
("BofQUtilitiesMenu")
Row = 2
Do Until IsEmpty(MenuSheet.Cells(Row, 1))
If MenuSheet.Cells(Row, 1) = 1 Then
Caption = MenuSheet.Cells(Row, 2)
Application.CommandBars(1).Controls _
(Caption).Delete
End If
Row = Row + 1
Loop
On Error GoTo 0
End Sub

The sub executes correctly, but when it ends, it jumps into another sub in a
standard module in the addin and runs it,
which raises the error.

How is this 2nd sub being called.....what can I look for,
please?

Regards.


 
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
How to close an Addin? FARAZ QURESHI Excel Discussion (Misc queries) 5 June 4th 09 01:15 PM
Excel addin problem markww[_3_] Excel Programming 0 November 16th 04 07:53 AM
Excel addin problem markww Excel Programming 1 November 15th 04 01:35 PM
AddIn installation problem ale036 Excel Programming 0 June 22nd 04 08:58 PM
Addin problem boopesh Excel Programming 1 December 11th 03 12:56 PM


All times are GMT +1. The time now is 01:47 AM.

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"