VBA-siable master view

  • Thread starter Thread starter Edward
  • Start date Start date
E

Edward

Hi Everybody,
In my addin I want to disable master view , so I need the code to disbale it
also I need to put this code in Auto-open to make sure master view is
disables upon opening the PP.
Any suggestions?
 
Never mind, I foud a way to do this

Dim ctrl As CommandBarPopup
Dim ctr As CommandBarControl
Set ctrl = CommandBars("Menu bar").Controls("&View")
For Each ctr In ctrl.Controls
If ctr.Caption = "&Master" Then
ctr.Visible = False
End If
'Next
 
Shyam ,As you said there are many ways to bypass this , but most users don't
know how to go into toolbar customization and add the items on a toolbar ,
plus i can add to the level of restrictions by disableing the toolbar
customization.
Steve, This addin is automatically loaded for all the users in our company
(700+) , so whenever they open a PP they have the addin loaded , I have to
have this code in Auto_open() otherwise they can make changes to the master
and then any of the addin codes. I have added a reverse code to make master
view visable in Auto_close so when they really need to use master for a
different PP they need to unload the addin and it will activate the
auto_close code. I think your other suggestion is interesting to try .
Possibily I can intrupt the master view button so when user clicks on it it
will check the type of pp and if it maches my pp it won't show the master
view . ummm I will work on this ...
 
Back
Top