Hey guys,
small question, I just adopted a file with a macro in it which I'm trying to figure out. My main problem is upon starting the file (or trying to close it for that matter) it gives me the error message above...
it even gives me the message if I try to switch between 2 open excel files which I found to be odd. I can't figure out what could be causing the error because on 8 other PCs the file gives no errors and works perfectly fine.
Here's the segment of code during which the error occurs (to be noted the "Next" line gets highlited only)
Public Sub DeleteAMenu(ByVal sMenuName As String)
Dim con As CommandBarPopup
Dim subcon As CommandBarControl
For Each con In Application.CommandBars(1).Controls
If con.Caption = sMenuName Then
con.Delete
End If
Next
End Sub
Any help would be appreciated!
Bookmarks