Solved

Creating ribbons in Access 2010

Posted on 2011-02-26
4
1,415 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

910 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now