Selasa, 29 Mei 2012

Re: [MS_AccessPros] Custom Ribbon

 

Bill

I haven't worked much with Access 2010, but some of my clients have it so I need to take the extra step to hide the Ribbon. I use this code:

Private Sub ShowHideRibbon(bolShowRibbon As Boolean)
'Purpose : Shows or hides Ribbon depending on Boolean argument.
' Can be run in versions older than 2007 with no ill effects.
'DateTime : 4/11/2011 08:03
'Author : Bill Mosca
'Requires :
On Error Resume Next

'Hide or restore ribbon in versions 2007+.
If bolShowRibbon = True Then
DoCmd.ShowToolbar "Ribbon", acToolbarYes
Else: DoCmd.ShowToolbar "Ribbon", acToolbarNo
End If

End Sub

Note that I use 'On Error Resume Next'. That is because most of my clients still use Access 2003 and there is no toolbar named "RibBon" so an error is thrown.

Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
Microsoft Office Access MVP
https://mvp.support.microsoft.com/profile/Bill.Mosca

--- In MS_Access_Professionals@yahoogroups.com, "Bill Singer" <Bill.Singer@...> wrote:
>
> Thanks Crystal, I had found this site but I had not found this page. I
> will update my code to the 2010 version. It looks like in 2010 the PRIVACY
> OPTIONS under the FILE tab are part of the Backstage View and not affected
> by changing the ribbon. Having access to the privacy options means that the
> user could change my default ribbons but they could not reverse the code
> that protects the navigation pane and short cut menus and they can't get to
> my tables, queries and reports. It may not be absolutely necessary to hide
> the PRIVACY OPTIONS but it would sure be nice.
>
>
>
> Thanks for the tip.
>
>
>
> Bill Singer
>
>
>
> From: MS_Access_Professionals@yahoogroups.com
> [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Crystal
> Sent: Monday, May 28, 2012 7:37 PM
> To: MS_Access_Professionals@yahoogroups.com
> Subject: Re: [MS_AccessPros] Custom Ribbon
>
>
>
>
>
> Hi Bill,
> this page might be helpful:
>
> Ribbon XML / Controls
>
> by Gunter Avenius
>
> http://www.accessribbon.de/en/index.php?Access_-_Ribbons:Ribbon_XML___Contro
> ls
>
> Warm Regards,
> Crystal
>
> *
> (: have an awesome day :)
> *
>
> ________________________________
> From: agent1of6
>
> I have been working on a few custom ribbons and it has been going
> surprisingly well. I now have three custom ribbons that work exactly like I
> want them to. I just have one concern. The plan with one of the ribbons
> is to eliminate everything. I put the following code in my UsysRibbons
> table. It eliminates everything except the FILE tab, which is fine except
> that under the file tab there is the PRIVACY OPTIONS selection. Is there
> any way to disable the PRIVACY OPTIONS?
>
> <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
> <ribbon startFromScratch="true">
> </ribbon>
> </customUI>
>
> I have inserted the module below (below is part of the code) to remove some
> of the other abilities in the database and it is working well.
> Sub disableStartupProperties()
> ChangeProperty "StartupShowDBWindow", dbBoolean, False
> ChangeProperty "StartupShowStatusBar", dbBoolean, False
> ChangeProperty "AllowBuiltinToolbars", dbBoolean, False
> ChangeProperty "AllowFullMenus", dbBoolean, False
> ChangeProperty "AllowBreadinCode", dbBoolean, False
> ChangeProperty "AllowSpecialKeys", dbBoolean, False
> ChangeProperty "AllowBypassKeys", dbBoolean, False
> ChangeProperty "AllowShortcutMenus", dbBoolean, False
> End Sub
>
> Thank you for your ongoing help.
> Bill
>
> [Non-text portions of this message have been removed]
>
>
>
>
>
> [Non-text portions of this message have been removed]
>

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar