Duplicate ToolBar Buttons
Bob,
I think I should run my solutions passed you first!
A little more testing and my solution bombed out too! Inclusion of error
handling is a good idea!
Peter
"Bob Phillips" wrote in message
...
Robin,
You could put error handling around it
On Error Resuume Next
'your code to create button, this will fail but the resume next
'will stop it bombing out
'On Error Goto 0
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"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
|