Solved

Creating ribbons in Access 2010

Posted on 2011-02-26
4
1,446 Views
Last Modified: 2012-05-11
I have created a ribbon in Access 2010 by adding XML to a table. The ribbons show fine.
What I wish to do is put some vba code behind the buttons as follows

But access does not recognise the IRibbonUI
I've check the object explorer but cannot find IRibbonUI there either
Please can you help me know how I get IRibbonUi to show?
Which object is it a part of?
'declaration
Public objRibbon As IRibbonUI


Public Sub OnRibbonLoad(objRib As IRibbonUI)

Set objRibbon = objRib

End Sub

'our callback for the SampleButton
Public Sub OnButtonPress(ctl As IRibbonControl)

If (ctl.ID = "SampleButton") Then

MsgBox ("You have just executed the OnButtonPress callback when clicking" _
& vbCrLf & "the Ribbon SampleButton!")

End If

End Sub
0
Comment
Question by:Philip001
  • 3
4 Comments
 
LVL 84
ID: 34988982
Have you seen this resource for the Ribbon:

http://www.accessribbon.de/en/?Access_-_Ribbons:Callbacks

There is a utilty there (Ribbon creator) that is an EXCELLENT investment, but if you're just looking for answers there is a ton of info there as well.
0
 

Author Comment

by:Philip001
ID: 34992806
Hi
Thanks for your information. I have already seen this site. I have copied the code but it is not recognised in the visual Basic editor. Do you know if I have to have a certain reference set for IRibbonUI to be recognised?
thanks so far
0
 

Accepted Solution

by:
Philip001 earned 0 total points
ID: 34996127
I found the answer in the following question
The object library I was after was Microsoft Office 14.0 Object Library

Experts ExchangeMicrosoftMS DevelopmentMS AccessAccess 2007 user-defined type not defined for user-interface code
0
 

Author Closing Comment

by:Philip001
ID: 35042283
I found the answer
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question