View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter M[_3_] Peter M[_3_] is offline
external usenet poster
 
Posts: 18
Default Duplicate ToolBar Buttons

Robin

I have a similar problem and appear (only just tried this!) to have a
solution by adding the following line to my Workbook_Open routine:

Application.CommandBars("Worksheet Menu
Bar").Controls("Navigation").Delete

When there is no "Navigation" control it seems to simply do nothing. I
realise this doesn't seem to be a programmatically sound approach - perhaps
others can comment.

Let me know if this works for you too.

Peter Morris
"Robin Clay" wrote in message
...
Greetings !

I have some routines in the "WorkbookOpen" routine
of various workbooks that create ToolBar buttons.

Generally, I have managed to get the relevant buttons
deleted when the workbook is closed, but what I haven't
yet
managed is to prevent new duplicate buttons being created.

Would SKS be so kind as to give me the relevant code ?

e.g.

Public Sub MakeButtons()

' Make "Print" button

If Exists Button(Print) Then ' <--- It's this line I
need help with !

Else
'Existing Make "Print" button routine goes here

End If


' Repeat for the other buttons


End Sub


RClay AT haswell DOT com