Custom Ribbon Errors

coolcatkelso

Registered User.
Local time
Today, 03:21
Joined
Jan 5, 2009
Messages
279
Hiya

I downloaded the wizard for Custom Ribbons - http://www.ribboncustomizer.clatonh.com/

Follwed the instructions and if I use Access built in commands, things work fine, but I'm trying to use it with macro

Basic stuff like Openform

Heres the code from the USysRibbon


Code:
<customUI xmlns="[URL]http://schemas.microsoft.com/office/2006/01/customui[/URL]">
<ribbon startFromScratch="true">
<tabs> <tab idMso="TabHomeAccess" visible="false"/>
<tab id="dbCustomTab" label="Customers" visible="true">
<group id="New" label="New">
<button id="" label="TEST" imageMso = "BlogHomePage" size ="large" onAction"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>

Error message is 0x80004005
Line: 8
Colum : 95
Value cannot be empty
The attribute "ID" with value " failed to Parse

I know there should be something on this line -
<button id="" label="TEST" imageMso = "BlogHomePage" size ="large" onAction"/>

But I don't know what?
________
Ship sale
 
Last edited:
Thanks bob

Had to give it the ID Name "Test1" (or something) restarted, still got error

For the OnAction "NameofMacro"

Got it working tho, THanks
________
Maryjane
 
Last edited:
hi

all control must have the name of "id" unique to be identified by a function or macro

onAction is the attribute that calls for a function or macro. Where the name of the function / macro in xml?

see the modified code

Code:
<customUI xmlns="[URL]http://schemas.microsoft.com/office/2006/01/customui[/URL]">
<ribbon startFromScratch="true">
<tabs> <tab idMso="TabHomeAccess" visible="false"/>
<tab id="dbCustomTab" label="Customers" visible="true">
<group id="New" label="New">
 
 
<button 
id="btSite" 
label="blog" 
imageMso = "BlogHomePage" 
size ="large"
tag = "http://www.yoursite"
onAction = "fncOnAction"
/>
 
</group>
</tab>
</tabs>
</ribbon>
</customUI>

create the function in the global module

Code:
Public Sub fncOnAction(control As IRibbonControl)
Select Case control.Id '
    Case "btSite"
        Call FollowHyperlink(control.Tag)
    Case Else
        MsgBox "clicked the button " & control.Id, vbInformation, "Warning"
End Select
End Sub

success
 

Users who are viewing this thread

Back
Top Bottom