UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Showing Ribbon For An Access Vba Addin    
 
   
timbailey
post Dec 28 2011, 03:47 PM
Post #1

UtterAccess Addict
Posts: 272



How does one launch an Access ribbon for an addin?

I am converting an Access2K application with an associated Access2K addin to run in Access 2010. I have created custom RibbonUI for both the application and the addin to replace the toolbars of the Access2K originals. When I run the addin by itself, its ribbon is displayed. But it doesn't launch when loaded as an addin to the other application. The only way I have been able to get it to show up in the loaded addin is to set it as the ribbon for every form in the addin.

Thanks for your help.
Go to the top of the page
 
+
strive4peace
post Feb 21 2012, 03:07 PM
Post #2

UtterAccess VIP
Posts: 20,228
From: Colorado



Hi Tim,

Each form allows you to set the ribbon. this gives you the greatest flexibility. Without knowing the details of your add-in, it is hard to give you a better answer.
Go to the top of the page
 
+
timbailey
post Feb 21 2012, 03:46 PM
Post #3

UtterAccess Addict
Posts: 272



Thanks, Crystal!

I worked out a way to do that. It does make it extremely complicated to create a single add-in that runs in multiple versions of Access, some relying on toolbars and others on ribbon.

Access 2010's support of custom ribbons is really abysmal compared to the other Office tools.

Thanks again,
Tim
Go to the top of the page
 
+
strive4peace
post Feb 21 2012, 03:58 PM
Post #4

UtterAccess VIP
Posts: 20,228
From: Colorado



Hi Tim,

actually, I think Access 2010 made LEAPS in customizing the ribbon. If you are installing an add-in, why not loop through all the forms and set the property programmatically? It would take about 10 minutes to write the code to do this .... let us know if you need help (IMG:style_emoticons/default/wink.gif)


Go to the top of the page
 
+
timbailey
post Feb 23 2012, 01:38 PM
Post #5

UtterAccess Addict
Posts: 272



Thanks Crystal,

Writing code to set the property for all the forms is exactly what I did. And I left the code in the app. The approach I used opens the forms and changes the property, so it must be done at design time. I cribbed it from a routine I wrote to add some code into the form_close event of every form.

The problem is that Access 2010 is not the principal target for the app. When other developers do a C&R (or something else, I'm not sure) in Access2K, the CustomUI and RibbonName properties disappear.

If you could point me to a way to set the RibbonName property of a form at run-time, I could use that in the add-in start up code.

Thanks again for your help,
Tim

Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 20th June 2013 - 07:31 AM