?
Solved

Creating ribbons in Access 2010

Posted on 2011-02-26
4
Medium Priority
?
1,490 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 85
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
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…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

752 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