Custom Toolbar

  • Thread starter Thread starter Tom Ulincy
  • Start date Start date
T

Tom Ulincy

I created a custom toolbar (Excel 2002, Win XP) and it
works on my pc. If I email the file the user gets a Run
Time Error message when opening the workbook. (Article
291068 Visible property does not apply to all commandbars -
Can't move focus to the control because it is invisible,
not enabled or of a type that does not accept the focus.)
The MS knowledge base acknowledges this is a problem but
does not seem to offer a solution.

Is there a way to save/send a file so other's can use a
custom toolbar?

TIA
Tom
 
Tom said:
If I email the file the user gets a Run
Time Error message when opening the workbook.
The way to use custom toolbars is:
a) attach the toolbar to your workbook (View / Toolbars / Customize /
Attach)
b) in your workbook's BeforeClose procedure (in ThisWorkbook module),
delete the toolbar from the user's customisation

Private Sub Workbook_BeforeClose(Cancel As Boolean)
On Error Resume Next
Application.Commandbars("MyBar").Delete
End Sub

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup
 
Back
Top