|
|
Ribbon
I have succeeded in using Albert D Kallal ' s brilliant code to control a
Ribbon on a form.
The only problem I cannot solve is how to make some buttons invisible when
the form loads.
If I put the meRib("btSearch").visible = False in Form_Active or Form_Current.
I get the runtime error '2475' you entered an expression that requires a form
to be the active window.
Any suggestions would be great.
--
Message posted via http://www.accessmonster.com
|
|
0
|
|
|
|
Reply
|
TonyAntique
|
5/31/2010 8:20:37 PM |
|
first make sure you have an onLoad="OnRibbonLoad" to start for your ribbon
item.
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
onLoad="OnRibbonLoad" >
the vba:
Public Sub OnRibbonLoad(objRibbon As IRibbonUI)
Set gobjRibbon = objRibbon
End Sub
second for the object(button/toggle, etc.) will need to add a
getEnabled="Somename" ' name of the code it will call
<button id="cmdADV" getVisible="GetVisible" /> ' leaving out other useful
ribbon attributes for clarification.
vba:
Public Sub GetVisible(ctl As IRibbonControl, ByRef Visible As Variant)
gobjRibbon.Invalidate
Select Case ctl.ID ' what ribbon property will be used to find items to enable
Case "cmdADV": Set Visible = Forms![Firm_Address]![IA] 'reason visible
Case "cmdCE": Set Visible = Forms![Firm_Address]![BD] 'other button
id(s), uses the same code
Case "grpChecklist": Set Visible = [Forms]![WSP_RegCat_Select]![Check2]
End Select
End Sub
in this code you will notice it uses Case, so in essence you can load all
items into one Sub referenced by their "id." of course the reason/value you
use to
enabled/disabled is up to you.
without going to much else farther you can replace ID, with Tag so maybe you
have a bunch of similar function buttons that will be visibleat the same
time. GetEnable works almost the same way.
hope that helps, i will try to watch for any response, i dont recieve the
emails anymore.
"TonyAntique via AccessMonster.com" wrote:
> I have succeeded in using Albert D Kallal ' s brilliant code to control a
> Ribbon on a form.
> The only problem I cannot solve is how to make some buttons invisible when
> the form loads.
> If I put the meRib("btSearch").visible = False in Form_Active or Form_Current.
>
> I get the runtime error '2475' you entered an expression that requires a form
> to be the active window.
> Any suggestions would be great.
>
> --
> Message posted via http://www.accessmonster.com
>
> .
>
|
|
0
|
|
|
|
Reply
|
Utf
|
6/2/2010 4:42:58 PM
|
|
|
1 Replies
516 Views
(page loaded in 0.031 seconds)
Similiar Articles: How to show a Customized Built-In Ribbon Tab When No Form is ...For an Access 2007 application (converted from Access 2003) I have a customized Ribbon tab that I need to show in two different places -- when viewi... Ribbon - Togglebutton for custom style - microsoft.public.word.vba ...Hi, I have developed a Word PhD template for our faculty which adds a new tab in the Ribbon. That tab has, among others, a set of buttons that ap... Minimized Ribbon on load - microsoft.public.accessHi, Is there a way to disable the menu and minimized the ribbon when opening the access file? Regards SF ... Ribbon - microsoft.public.access.gettingstartedI have succeeded in using Albert D Kallal ' s brilliant code to control a Ribbon on a form. The only problem I cannot solve is how to make some butt... Checkbox value in a custom ribbon - microsoft.public.excel ...I have created a custom ribbon including a checkbox with a callback to set its value in a public variable. The checkbox value is LATER used as a par... Data Analysis disappears from the Data ribbon for no reason ...Every now and then (usually at the most inconvenient moment) Data Anylysis disappears from the data ribbon. If I return to Excel Options to try to ... Access runtime ribbon - export to word option missing. - microsoft ...When you create a 2007 runtime application the option on the print preview ribbon to export the report to word disapears. I have had to create my o... Access 2007 Ribbon Programming - microsoft.public.access.forms ...Hi All, Sorry if my previous posting's sounded like a reason to vent my frustration, but to put things straight I like the Ribbon concept and as a... Print button on ribbon not enabled - microsoft.public.access ...Weird button behavior on print preview ribbon in Access 2007. For some time now, I have noticed that occasionally, when we open a report in print pr... Change The Color of A Ribbon Tab - microsoft.public.excel ...Is it possible to do so like as in the special greenish tabs appearing upon selecting chart a object etc.? If yes would you kindly convey me the ... Wholesale Ribbon & Tulle | Satin Ribbons & Wedding DecorationsWith wholesale ribbons from BBCrafts, your crafting spirit will awaken when you see the choices of wholesale ribbon fabrics and designs that are available. Wholesale Ribbon | Discount Ribbon | JKM Ribbon & Trims - JKMBuy ribbon & trims at wholesale prices, up to 70% off retail price! JKM Ribbon & Trim has supplied brides, wedding planners, designers and more for over 15 years. Grosgrain Ribbon, Hair Bows, Ribbons, and Much MoreQuality Products. Quality Prices. Quality Service. Most orders ship within 1 business day or less! At The Ribbon Retreat, we carry the highest quality grosgrain ... Lowest Wholesale Prices | Immediate Shipping | Artistic Ribbon, Inc.Artistic Ribbon is the only ribbon supplier where most ribbon orders are shipped same day or within 24 hours from a stock warehouse. Artistic Ribbon is the largest ... Ribbon (computing) - Wikipedia, the free encyclopediaIn GUI -based application software, a ribbon is an interface where a set of toolbars are placed on tabs in a tab bar. Recent releases of some Microsoft and Autodesk ... 7/26/2012 2:58:54 AM
|
|
|
|
|
|
|
|
|