Disable menu bar items

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In my current application i have a custom made menu bar. I want to
disable/enable menu bar items run-time based upon the privileges granted to
the current user. How do I edo this with VBA code?

Thanks for any assistance.

/Leif
 
hi Leif,

Leif said:
In my current application i have a custom made menu bar. I want to
disable/enable menu bar items run-time based upon the privileges granted to
the current user. How do I edo this with VBA code?
You need to reference the Microsoft Office Library:

Public Function ReportCheckCommandBars() As Boolean

On Local Error Resume Next

Dim cb As Office.CommandBar

For Each cb In CommandBars
If cb.Name = "Print Preview" Then
cb.Visible = True
End If
Next cb

End Function


mfG
--> stefan <--
 
Back
Top