Henry Vandersteen
asked on
Launch app from Access custom ribbon
Hi all
I have created a custom ribbon in Access 2010 that works great. I would like to add a feature to this ribbon to launch an external app.
My question is whats the best way to do that. Is it write the code in VBA and save to launch from a Macro button? I was hoping just a custom button in my ribbon. How do i link the vba code to my custom 'button' or whatever, in the ribbon?
Thanks
H
I have created a custom ribbon in Access 2010 that works great. I would like to add a feature to this ribbon to launch an external app.
My question is whats the best way to do that. Is it write the code in VBA and save to launch from a Macro button? I was hoping just a custom button in my ribbon. How do i link the vba code to my custom 'button' or whatever, in the ribbon?
Thanks
H
I added the Topic MS Access to get the right people looking at your question.
ASKER
Thanks Mike
It was originally part of my question, but when I tried to submit I go an error saying it couldnt be part of my submission...go figure huh
H
It was originally part of my question, but when I tried to submit I go an error saying it couldnt be part of my submission...go figure huh
H
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Anders and Joe
Sorry for late reply.
Great stuff, still a bit confused though
So Anders when I try to compile my db it errs here Public Function OpenApp(iribCtrl As IRibbonControl) with User defined type not defined. Is there a library I need to reference??
Joe...I dont get the link between vba code in say a module or a form, and the item on the ribbon. How does the code make the connection between the two?
Thanks
H
Sorry for late reply.
Great stuff, still a bit confused though
So Anders when I try to compile my db it errs here Public Function OpenApp(iribCtrl As IRibbonControl) with User defined type not defined. Is there a library I need to reference??
Joe...I dont get the link between vba code in say a module or a form, and the item on the ribbon. How does the code make the connection between the two?
Thanks
H
Hi Henry
The reference is "Microsoft Office 14.0". (or whatever version number fits your installation)
You might be able to go without the reference if you use this instead:
I have not tried that.
The reference is "Microsoft Office 14.0". (or whatever version number fits your installation)
You might be able to go without the reference if you use this instead:
Public Function OpenApp(iribCtrl As Object)
Shell "myApp.exe"
End Function
I have not tried that.
The connections is what Anders showed above:
<button id="btnMyButon"
label="Open App"
onAction="OpenApp"
size="large"/>
Except that onAction="OpenApp" would be - I think - onAction="OnButtonAction" which passes the ControlID to my Function with the Select Case statements. I'm not able to look at a Ribbon at the moment, so I'm winging it a bit.
I created my own vbaRibbon - to process various calls from the Ribbon.
<button id="btnMyButon"
label="Open App"
onAction="OpenApp"
size="large"/>
Except that onAction="OpenApp" would be - I think - onAction="OnButtonAction" which passes the ControlID to my Function with the Select Case statements. I'm not able to look at a Ribbon at the moment, so I'm winging it a bit.
I created my own vbaRibbon - to process various calls from the Ribbon.
ASKER
Hi Anders and Joe
I think I have enough info from you fellows to get me to a solution
Thanks very much for your help
Henry
I think I have enough info from you fellows to get me to a solution
Thanks very much for your help
Henry