PC Review


Reply
Thread Tools Rate Thread

adding custom macro controls to Fluent RibbonUI

 
 
=?Utf-8?B?U3RldmVEQjE=?=
Guest
Posts: n/a
 
      23rd May 2007
Hello again.
I've finally got the menu structure for my customized ribbon menu.
Now I just need to connect the macros I have to each of the items/buttons.
As mentioned yesterday in my last post, I've read the pdf file from that
group in Britain--OALtd. While I see the "getItem..." components, I don't see
anything that specifically identifies how to connect my macros with the
components I made for the ribbon.
How can I do this?
My initialy thoughts would be to use the onAction="pathway to macro, and
macro name". I.e., c:\documents and settings\ user name\ application
data\microsoft\excel\xlstart\filename.xlsb!MacroName
However, the macros are stored in a structure based on ron DeBruin's
macro-module/menu.

how do I accomplish this?
Thank you in advance.

 
Reply With Quote
 
 
 
 
Ron de Bruin
Guest
Posts: n/a
 
      23rd May 2007
Hi Steve

If you use my samples in the UI editor you can read that you can click
on the create callbacks button to create the callbacks for every onaction

Copy them in a module of your workbook and add your code
http://www.rondebruin.nl/ribbon.htm

From the site

Generate Callbacks : This will create macros(callbacks) for each onAction you have in your xml.
Select all callbacks and copy them in a normal module in your workbook.
Try this in one of the examples and you will see that it is not so difficult.
After that you can insert the code between the Sub and End Sub line in the macros(callbacks)


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"SteveDB1" <(E-Mail Removed)> wrote in message news:E8EC0841-05F6-4666-A8A7-(E-Mail Removed)...
> Hello again.
> I've finally got the menu structure for my customized ribbon menu.
> Now I just need to connect the macros I have to each of the items/buttons.
> As mentioned yesterday in my last post, I've read the pdf file from that
> group in Britain--OALtd. While I see the "getItem..." components, I don't see
> anything that specifically identifies how to connect my macros with the
> components I made for the ribbon.
> How can I do this?
> My initialy thoughts would be to use the onAction="pathway to macro, and
> macro name". I.e., c:\documents and settings\ user name\ application
> data\microsoft\excel\xlstart\filename.xlsb!MacroName
> However, the macros are stored in a structure based on ron DeBruin's
> macro-module/menu.
>
> how do I accomplish this?
> Thank you in advance.
>

 
Reply With Quote
 
=?Utf-8?B?U3RldmVEQjE=?=
Guest
Posts: n/a
 
      23rd May 2007
Ok.
Now, let me ask this:
You show:
onAction="Macro1"

How much of the macro name, or path do I need to include?
I.e., right now, my personal.xlsb 'houses' all of the macros-- this uses
your structure we previously discussed. In that file's macro module are all
of the macros.
My basic assumption is that I'd only include the name of the specific macro.
But as I consider this farther, it seems necessary to tell it where to look
to activate the specific macro.
Again.
Thank you.


"Ron de Bruin" wrote:

> Hi Steve
>
> If you use my samples in the UI editor you can read that you can click
> on the create callbacks button to create the callbacks for every onaction
>
> Copy them in a module of your workbook and add your code
> http://www.rondebruin.nl/ribbon.htm
>
> From the site
>
> Generate Callbacks : This will create macros(callbacks) for each onAction you have in your xml.
> Select all callbacks and copy them in a normal module in your workbook.
> Try this in one of the examples and you will see that it is not so difficult.
> After that you can insert the code between the Sub and End Sub line in the macros(callbacks)
>
>
> --
>
> Regards Ron de Bruin
> http://www.rondebruin.nl/tips.htm
>
>
> "SteveDB1" <(E-Mail Removed)> wrote in message news:E8EC0841-05F6-4666-A8A7-(E-Mail Removed)...
> > Hello again.
> > I've finally got the menu structure for my customized ribbon menu.
> > Now I just need to connect the macros I have to each of the items/buttons.
> > As mentioned yesterday in my last post, I've read the pdf file from that
> > group in Britain--OALtd. While I see the "getItem..." components, I don't see
> > anything that specifically identifies how to connect my macros with the
> > components I made for the ribbon.
> > How can I do this?
> > My initialy thoughts would be to use the onAction="pathway to macro, and
> > macro name". I.e., c:\documents and settings\ user name\ application
> > data\microsoft\excel\xlstart\filename.xlsb!MacroName
> > However, the macros are stored in a structure based on ron DeBruin's
> > macro-module/menu.
> >
> > how do I accomplish this?
> > Thank you in advance.
> >

>

 
Reply With Quote
 
=?Utf-8?B?U3RldmVEQjE=?=
Guest
Posts: n/a
 
      23rd May 2007
oops... something I forgot to add.
When I place the onAction command, and validate, I get the error message
that onAction has not been declared.
Everything that I've read thus far says nothing about "pre-declaring" this
command.
i.e., as in VBA where I'd need to do
Dim As ......
Again--- thank you.

"Ron de Bruin" wrote:

> Hi Steve
>
> If you use my samples in the UI editor you can read that you can click
> on the create callbacks button to create the callbacks for every onaction
>
> Copy them in a module of your workbook and add your code
> http://www.rondebruin.nl/ribbon.htm
>
> From the site
>
> Generate Callbacks : This will create macros(callbacks) for each onAction you have in your xml.
> Select all callbacks and copy them in a normal module in your workbook.
> Try this in one of the examples and you will see that it is not so difficult.
> After that you can insert the code between the Sub and End Sub line in the macros(callbacks)
>
>
> --
>
> Regards Ron de Bruin
> http://www.rondebruin.nl/tips.htm
>
>
> "SteveDB1" <(E-Mail Removed)> wrote in message news:E8EC0841-05F6-4666-A8A7-(E-Mail Removed)...
> > Hello again.
> > I've finally got the menu structure for my customized ribbon menu.
> > Now I just need to connect the macros I have to each of the items/buttons.
> > As mentioned yesterday in my last post, I've read the pdf file from that
> > group in Britain--OALtd. While I see the "getItem..." components, I don't see
> > anything that specifically identifies how to connect my macros with the
> > components I made for the ribbon.
> > How can I do this?
> > My initialy thoughts would be to use the onAction="pathway to macro, and
> > macro name". I.e., c:\documents and settings\ user name\ application
> > data\microsoft\excel\xlstart\filename.xlsb!MacroName
> > However, the macros are stored in a structure based on ron DeBruin's
> > macro-module/menu.
> >
> > how do I accomplish this?
> > Thank you in advance.
> >

>

 
Reply With Quote
 
=?Utf-8?B?U3RldmVEQjE=?=
Guest
Posts: n/a
 
      24th May 2007
Ron,
I've done as you described in your examples, and I receive the following
error:
"Wrong number of arguments or invalid property assignment."
As previously mentioned, I've stored all of my macros in the MacroModule you
created with your custom menu we'd discussed before-- the RDB xlsb file-- I
have however changed the name to personal.xlsb.
Because of this, I've tried naming the OnAction="Macro1" two different ways.
1- onAction="personal.xlsb!Macro1"
2- onAction="Macro1"
where Macro1 is my own chosen name for the macro for my test.
The callback in the UI editor shows up fine, but I receive the same above
mentioned error each time.
In fact, for what it's worth, here is the callback statement I receive.

'Callback for button1 onAction
Sub GBS(control as IRibbonControl)
End Sub

I'll be among the first to say that my understanding is real limited here.
The general structure of my menu xlam file worksreally well. I just am not
understanding how to link the macros to the menu buttons/items.

For the sake of discussion I found some older macros that are in my old
personal.xls file.
I choose the same general configuration as above--
onAction="personal.xls!Macro1"
onAction="personal.Macro1"
And
onAction="Macro1"
The callback for the first is identical to the one pasted above.
The second and third give no callbacks.
All three, when activated in excel give me the error I state up top--
"wrong # of arguments, or invalid property."

Again, as always, thank you.
Best.
SteveB.


"Ron de Bruin" wrote:

> Hi Steve
>
> If you use my samples in the UI editor you can read that you can click
> on the create callbacks button to create the callbacks for every onaction
>
> Copy them in a module of your workbook and add your code
> http://www.rondebruin.nl/ribbon.htm
>
> From the site
>
> Generate Callbacks : This will create macros(callbacks) for each onAction you have in your xml.
> Select all callbacks and copy them in a normal module in your workbook.
> Try this in one of the examples and you will see that it is not so difficult.
> After that you can insert the code between the Sub and End Sub line in the macros(callbacks)
>
>
> --
>
> Regards Ron de Bruin
> http://www.rondebruin.nl/tips.htm
>
>
> "SteveDB1" <(E-Mail Removed)> wrote in message news:E8EC0841-05F6-4666-A8A7-(E-Mail Removed)...
> > Hello again.
> > I've finally got the menu structure for my customized ribbon menu.
> > Now I just need to connect the macros I have to each of the items/buttons.
> > As mentioned yesterday in my last post, I've read the pdf file from that
> > group in Britain--OALtd. While I see the "getItem..." components, I don't see
> > anything that specifically identifies how to connect my macros with the
> > components I made for the ribbon.
> > How can I do this?
> > My initialy thoughts would be to use the onAction="pathway to macro, and
> > macro name". I.e., c:\documents and settings\ user name\ application
> > data\microsoft\excel\xlstart\filename.xlsb!MacroName
> > However, the macros are stored in a structure based on ron DeBruin's
> > macro-module/menu.
> >
> > how do I accomplish this?
> > Thank you in advance.
> >

>

 
Reply With Quote
 
Ron de Bruin
Guest
Posts: n/a
 
      24th May 2007
Hi Steve

Send me your file private steve then I look at it


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"SteveDB1" <(E-Mail Removed)> wrote in message news:828C9F21-B8AB-4F71-909B-(E-Mail Removed)...
> Ron,
> I've done as you described in your examples, and I receive the following
> error:
> "Wrong number of arguments or invalid property assignment."
> As previously mentioned, I've stored all of my macros in the MacroModule you
> created with your custom menu we'd discussed before-- the RDB xlsb file-- I
> have however changed the name to personal.xlsb.
> Because of this, I've tried naming the OnAction="Macro1" two different ways.
> 1- onAction="personal.xlsb!Macro1"
> 2- onAction="Macro1"
> where Macro1 is my own chosen name for the macro for my test.
> The callback in the UI editor shows up fine, but I receive the same above
> mentioned error each time.
> In fact, for what it's worth, here is the callback statement I receive.
>
> 'Callback for button1 onAction
> Sub GBS(control as IRibbonControl)
> End Sub
>
> I'll be among the first to say that my understanding is real limited here.
> The general structure of my menu xlam file worksreally well. I just am not
> understanding how to link the macros to the menu buttons/items.
>
> For the sake of discussion I found some older macros that are in my old
> personal.xls file.
> I choose the same general configuration as above--
> onAction="personal.xls!Macro1"
> onAction="personal.Macro1"
> And
> onAction="Macro1"
> The callback for the first is identical to the one pasted above.
> The second and third give no callbacks.
> All three, when activated in excel give me the error I state up top--
> "wrong # of arguments, or invalid property."
>
> Again, as always, thank you.
> Best.
> SteveB.
>
>
> "Ron de Bruin" wrote:
>
>> Hi Steve
>>
>> If you use my samples in the UI editor you can read that you can click
>> on the create callbacks button to create the callbacks for every onaction
>>
>> Copy them in a module of your workbook and add your code
>> http://www.rondebruin.nl/ribbon.htm
>>
>> From the site
>>
>> Generate Callbacks : This will create macros(callbacks) for each onAction you have in your xml.
>> Select all callbacks and copy them in a normal module in your workbook.
>> Try this in one of the examples and you will see that it is not so difficult.
>> After that you can insert the code between the Sub and End Sub line in the macros(callbacks)
>>
>>
>> --
>>
>> Regards Ron de Bruin
>> http://www.rondebruin.nl/tips.htm
>>
>>
>> "SteveDB1" <(E-Mail Removed)> wrote in message news:E8EC0841-05F6-4666-A8A7-(E-Mail Removed)...
>> > Hello again.
>> > I've finally got the menu structure for my customized ribbon menu.
>> > Now I just need to connect the macros I have to each of the items/buttons.
>> > As mentioned yesterday in my last post, I've read the pdf file from that
>> > group in Britain--OALtd. While I see the "getItem..." components, I don't see
>> > anything that specifically identifies how to connect my macros with the
>> > components I made for the ribbon.
>> > How can I do this?
>> > My initialy thoughts would be to use the onAction="pathway to macro, and
>> > macro name". I.e., c:\documents and settings\ user name\ application
>> > data\microsoft\excel\xlstart\filename.xlsb!MacroName
>> > However, the macros are stored in a structure based on ron DeBruin's
>> > macro-module/menu.
>> >
>> > how do I accomplish this?
>> > Thank you in advance.
>> >

>>

 
Reply With Quote
 
Ron de Bruin
Guest
Posts: n/a
 
      24th May 2007
Btw: the xml to create the menu is not working in your personal.xlsb.
You can make it a add-in

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Ron de Bruin" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> Hi Steve
>
> Send me your file private steve then I look at it
>
>
> --
>
> Regards Ron de Bruin
> http://www.rondebruin.nl/tips.htm
>
>
> "SteveDB1" <(E-Mail Removed)> wrote in message news:828C9F21-B8AB-4F71-909B-(E-Mail Removed)...
>> Ron,
>> I've done as you described in your examples, and I receive the following
>> error:
>> "Wrong number of arguments or invalid property assignment."
>> As previously mentioned, I've stored all of my macros in the MacroModule you
>> created with your custom menu we'd discussed before-- the RDB xlsb file-- I
>> have however changed the name to personal.xlsb.
>> Because of this, I've tried naming the OnAction="Macro1" two different ways.
>> 1- onAction="personal.xlsb!Macro1"
>> 2- onAction="Macro1"
>> where Macro1 is my own chosen name for the macro for my test.
>> The callback in the UI editor shows up fine, but I receive the same above
>> mentioned error each time.
>> In fact, for what it's worth, here is the callback statement I receive.
>>
>> 'Callback for button1 onAction
>> Sub GBS(control as IRibbonControl)
>> End Sub
>>
>> I'll be among the first to say that my understanding is real limited here.
>> The general structure of my menu xlam file worksreally well. I just am not
>> understanding how to link the macros to the menu buttons/items.
>>
>> For the sake of discussion I found some older macros that are in my old
>> personal.xls file.
>> I choose the same general configuration as above--
>> onAction="personal.xls!Macro1"
>> onAction="personal.Macro1"
>> And
>> onAction="Macro1"
>> The callback for the first is identical to the one pasted above.
>> The second and third give no callbacks.
>> All three, when activated in excel give me the error I state up top--
>> "wrong # of arguments, or invalid property."
>>
>> Again, as always, thank you.
>> Best.
>> SteveB.
>>
>>
>> "Ron de Bruin" wrote:
>>
>>> Hi Steve
>>>
>>> If you use my samples in the UI editor you can read that you can click
>>> on the create callbacks button to create the callbacks for every onaction
>>>
>>> Copy them in a module of your workbook and add your code
>>> http://www.rondebruin.nl/ribbon.htm
>>>
>>> From the site
>>>
>>> Generate Callbacks : This will create macros(callbacks) for each onAction you have in your xml.
>>> Select all callbacks and copy them in a normal module in your workbook.
>>> Try this in one of the examples and you will see that it is not so difficult.
>>> After that you can insert the code between the Sub and End Sub line in the macros(callbacks)
>>>
>>>
>>> --
>>>
>>> Regards Ron de Bruin
>>> http://www.rondebruin.nl/tips.htm
>>>
>>>
>>> "SteveDB1" <(E-Mail Removed)> wrote in message news:E8EC0841-05F6-4666-A8A7-(E-Mail Removed)...
>>> > Hello again.
>>> > I've finally got the menu structure for my customized ribbon menu.
>>> > Now I just need to connect the macros I have to each of the items/buttons.
>>> > As mentioned yesterday in my last post, I've read the pdf file from that
>>> > group in Britain--OALtd. While I see the "getItem..." components, I don't see
>>> > anything that specifically identifies how to connect my macros with the
>>> > components I made for the ribbon.
>>> > How can I do this?
>>> > My initialy thoughts would be to use the onAction="pathway to macro, and
>>> > macro name". I.e., c:\documents and settings\ user name\ application
>>> > data\microsoft\excel\xlstart\filename.xlsb!MacroName
>>> > However, the macros are stored in a structure based on ron DeBruin's
>>> > macro-module/menu.
>>> >
>>> > how do I accomplish this?
>>> > Thank you in advance.
>>> >
>>>

 
Reply With Quote
 
=?Utf-8?B?U3RldmVEQjE=?=
Guest
Posts: n/a
 
      24th May 2007
just for final closure,
After speaking with Ron, and having something of an induced epiphany, the
solution to my quandry is:
The file in which the macros reside needs to be saved as the xlam file-- as
described by the OALTD PDF file I mentioned in another post (page 2 or 3).
Open that xlam file in the UI Editor
Using the UI Editor, write out your desired menu structure code, and
save/validate it.
Then to activate/link the macros between the xml code, and the actual
macros, click the generate callback button in the editor.
An example using Ron's custom menu from his website.
He has all of his macros listed on a worksheet-- saved as an xlsb file.
There are three macro modules housing all of the actual macros.
SAve that xlsb file to an xlam file. Design your menu the way you want, and
insert that xml code into the xlam file you just save. Validate, and then
generate your callbacks. you should then have a working ribbon menu.
This appears to be my solution, and I'm considering this matter resolved.
Ron, thank you.


"Ron de Bruin" wrote:

> Btw: the xml to create the menu is not working in your personal.xlsb.
> You can make it a add-in
>
> --
>
> Regards Ron de Bruin
> http://www.rondebruin.nl/tips.htm
>
>
> "Ron de Bruin" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> > Hi Steve
> >
> > Send me your file private steve then I look at it
> >
> >
> > --
> >
> > Regards Ron de Bruin
> > http://www.rondebruin.nl/tips.htm
> >
> >
> > "SteveDB1" <(E-Mail Removed)> wrote in message news:828C9F21-B8AB-4F71-909B-(E-Mail Removed)...
> >> Ron,
> >> I've done as you described in your examples, and I receive the following
> >> error:
> >> "Wrong number of arguments or invalid property assignment."
> >> As previously mentioned, I've stored all of my macros in the MacroModule you
> >> created with your custom menu we'd discussed before-- the RDB xlsb file-- I
> >> have however changed the name to personal.xlsb.
> >> Because of this, I've tried naming the OnAction="Macro1" two different ways.
> >> 1- onAction="personal.xlsb!Macro1"
> >> 2- onAction="Macro1"
> >> where Macro1 is my own chosen name for the macro for my test.
> >> The callback in the UI editor shows up fine, but I receive the same above
> >> mentioned error each time.
> >> In fact, for what it's worth, here is the callback statement I receive.
> >>
> >> 'Callback for button1 onAction
> >> Sub GBS(control as IRibbonControl)
> >> End Sub
> >>
> >> I'll be among the first to say that my understanding is real limited here.
> >> The general structure of my menu xlam file worksreally well. I just am not
> >> understanding how to link the macros to the menu buttons/items.
> >>
> >> For the sake of discussion I found some older macros that are in my old
> >> personal.xls file.
> >> I choose the same general configuration as above--
> >> onAction="personal.xls!Macro1"
> >> onAction="personal.Macro1"
> >> And
> >> onAction="Macro1"
> >> The callback for the first is identical to the one pasted above.
> >> The second and third give no callbacks.
> >> All three, when activated in excel give me the error I state up top--
> >> "wrong # of arguments, or invalid property."
> >>
> >> Again, as always, thank you.
> >> Best.
> >> SteveB.
> >>
> >>
> >> "Ron de Bruin" wrote:
> >>
> >>> Hi Steve
> >>>
> >>> If you use my samples in the UI editor you can read that you can click
> >>> on the create callbacks button to create the callbacks for every onaction
> >>>
> >>> Copy them in a module of your workbook and add your code
> >>> http://www.rondebruin.nl/ribbon.htm
> >>>
> >>> From the site
> >>>
> >>> Generate Callbacks : This will create macros(callbacks) for each onAction you have in your xml.
> >>> Select all callbacks and copy them in a normal module in your workbook.
> >>> Try this in one of the examples and you will see that it is not so difficult.
> >>> After that you can insert the code between the Sub and End Sub line in the macros(callbacks)
> >>>
> >>>
> >>> --
> >>>
> >>> Regards Ron de Bruin
> >>> http://www.rondebruin.nl/tips.htm
> >>>
> >>>
> >>> "SteveDB1" <(E-Mail Removed)> wrote in message news:E8EC0841-05F6-4666-A8A7-(E-Mail Removed)...
> >>> > Hello again.
> >>> > I've finally got the menu structure for my customized ribbon menu.
> >>> > Now I just need to connect the macros I have to each of the items/buttons.
> >>> > As mentioned yesterday in my last post, I've read the pdf file from that
> >>> > group in Britain--OALtd. While I see the "getItem..." components, I don't see
> >>> > anything that specifically identifies how to connect my macros with the
> >>> > components I made for the ribbon.
> >>> > How can I do this?
> >>> > My initialy thoughts would be to use the onAction="pathway to macro, and
> >>> > macro name". I.e., c:\documents and settings\ user name\ application
> >>> > data\microsoft\excel\xlstart\filename.xlsb!MacroName
> >>> > However, the macros are stored in a structure based on ron DeBruin's
> >>> > macro-module/menu.
> >>> >
> >>> > how do I accomplish this?
> >>> > Thank you in advance.
> >>> >
> >>>

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using macros stored in .XLAM add-on via custom RibbonUI control s300pmu1 Microsoft Excel Programming 2 19th Mar 2009 10:26 AM
How to add button for macro in Fluent UI? Yajiv Microsoft Excel Discussion 6 19th Jun 2008 06:27 PM
Adding Dynamic Buttons to the RibbonUI =?Utf-8?B?a2Fwa2VtYQ==?= Microsoft Outlook Program Addins 3 28th Aug 2007 02:17 PM
getting started on Fluent RibbonUI =?Utf-8?B?U3RldmVEQjE=?= Microsoft Excel Programming 2 23rd May 2007 07:54 PM
Adding custom controls to VS.net Guy Brom Microsoft C# .NET 0 6th Mar 2004 03:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:48 AM.