Code to Add Toolbar Button
Posted by JAF on May 31, 2000 1:42 AM
I have the following code which adds and removes the Web "Back" button to the end of my Standard Toolbar
ADD...
Application.CommandBars("Standard").Controls.Add Type:=msoControlButton, Id:=1017, Before:=25
REMOVE...
Application.CommandBars("Standard").Controls(25).Delete
The problem I have is that the Standard Toolbars of my users have been customised (which they need to keep) so each user's Standard Toolbar has a different number of existing toolbar buttons - mine has 24 (hence 25 in the above code) but other users have different numbers of toolbar icons.
Is there any way to add the Web "Back" button to the END of the Standard Toolbar (and also remove it later) irrespective of the number of buttons on the toolbar? I have a current compromise whereby I can add/remove the button as the first item on the toolbar, but I want it at the end.
Any help appreciated.
JAF