Close button on Custom Menu Bars

  • Thread starter Thread starter Aaron
  • Start date Start date
A

Aaron

Hi all!

I would really appreciate if someone could tell me how to
disable the close button on a custom menu bar, i have an
API for the window but i was wondering if theres one
avaliable for the custom bar?

Yours Hopefully

Aaron
 
Hey thanks for the code, i'm afraid im refering to the
close 'x' button on the dialog.

If you have any ideas let me know

Thanks

Aaron
 
I think you're looking for: msoBarNoChangeVisible

Option Explicit
Sub testme()

Dim cb As CommandBar

On Error Resume Next
Application.CommandBars("test").Delete
On Error GoTo 0

Set cb = Application.CommandBars.Add(Name:="test", temporary:=True)
With cb
.Visible = True
.Protection = msoBarNoChangeVisible
End With

End Sub

I couldn't hide it, but I could delete it.
 

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


Back
Top