Custom Command Bar Erroring out when distributed

B

Bret

I've created a custom command menu bar for my Excel VBA app that appears on
right side of screen when application is opened.
It works great when I use it, the problem is when I send it (via Outlook) to
other users in my company it errors out.

Here is the Auto_Open code:
Sub Auto_Open()
Application.CommandBars("Formatting").Visible = False
Application.CommandBars("Standard").Visible = False
Application.CommandBars("Global").Visible = True
Application.CommandBars("Global").Enabled = True
application.CommandBars("GlobalComp").Position = msoBarRight
End Sub

Here is the error my users are getting:
“run time error-2147024809 (80070057)â€- cant move focus to the control
because it is invisible, not enabled, or of a type that does not accept the
focus

When I debug the program on their workstation, I actually cant find my
"Global" command bar listed as one of the toolbar selections. Does the custom
command bar only exists on my workstation?

thanks in advance.
 
B

Bob Phillips

Probably. Better to build it dynamically in the workbook.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top