Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / April 2007

Tip: Looking for answers? Try searching our database.

Excel 2007 Menus - Ron De Bruin please

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
michael.beckinsale - 06 Feb 2007 11:22 GMT
Ron,

I have looked at your website revisions and l think the explanation /
examples for changing the Ribbon are now much clearer.

I have followed / used your examples succesfully to the extent that l
have even 'edited' the XML code to give me the look and appearance l
wanted on the Ribbon. (I know very little about XML) Many thanks, l am
sure many advanced Excel users will benefit from your efforts.

I have 1 further question to ask you. How did you create the XML
example code? If l could do the same it would enable me to create
templates for the menu structures l use frequently. I would then only
have to rename the Tab & Group within the XML code.

TIA

Regards

Michael Beckinsale
Bob Phillips - 06 Feb 2007 11:40 GMT
Michael,

You can edit XML in any text editor, but Ron probably used the Custom UI
Editor Tool that he mentions at the start of this page
http://www.rondebruin.nl/ribbon.htm

Signature

HTH

Bob Phillips

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> Ron,
>
[quoted text clipped - 16 lines]
>
> Michael Beckinsale
michael.beckinsale - 06 Feb 2007 12:13 GMT
Hi Bob,

I tried that yesterday without success.

However after you confirmed what l thought l persevered, using
notepad, and if you change the extension to XML you can save to the
'Samples' folder of Custom RibbinUI tool. This means that you can make
'XML templates' of your favourite type of menu layouts and then easily
edit them for the particular workbook you are developing. I used the
examples in the tools + Ron's examples as a starting point and have
succesfully created customised menus as l want them.

You cant use the tool directly to save an 'XML template' as it will
only save it directly into an .xlsm workbook.

The next stage is to try and integrate this with John Walkenbach's /
Rons 'MenuMaker' approach which l use on a regular basis. Any ideas?

Thanks for your quick response.

Regards

Michael beckinsale
Ron de Bruin - 06 Feb 2007 12:24 GMT
Hi Michael

You can create one menu button on the ribbon and call the PopUp macro with onAction.
This is very easy

Or add the code in the macro

Sub Macro1(control as IRibbonControl)
On Error Resume Next
   Application.CommandBars(ThisWorkbook.Sheets("MenuSheet").Range("B2").Value).ShowPopup
On Error GoTo 0
End Sub

Signature

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

> Hi Bob,
>
[quoted text clipped - 19 lines]
>
> Michael beckinsale
Bob Phillips - 06 Feb 2007 13:36 GMT
I thought someone had already done that. If I can find it, I will post back.

Signature

---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> Hi Bob,
>
[quoted text clipped - 19 lines]
>
> Michael beckinsale
Jim Rech - 06 Feb 2007 14:59 GMT
Michael-

The custom UI editor is a great tool for several things but it is a terrible
pure XML editor.  For one thing the text is constantly reformatting as you
type so the screen jumps all over the place.  For another it does not
reference the customUI.XSD so you get no intellisense.  For another it has
no Find or Find/Replace.  For another it does not support
outlining/collapsing...

If you're going to spend any time creating or editing XML files you have to
get a true XML editor.  I'm new to actually doing things with XML too, so I
don't know all the editors out there and their pros and cons.  But since I
have Visual Studio 2005 I use its built-in XML editor, which supplies all
the things I mentioned above.  Folks - INTELLISENSE - you must have this to
get anything done creating Ribbonx.  It's great - soooo much easier.

What all XML editors lack (as far as I know) is the ability to do what the
Custom UI editor does - stick your Ribbonx file in the Excel file and create
the needed references to it.  When that happens we'll have the tool we
really need.  Until then, I create in the VS editor and copy/paste into the
Custom UI editor.

Signature

Jim

| Hi Bob,
|
[quoted text clipped - 19 lines]
|
| Michael beckinsale
Bob Phillips - 06 Feb 2007 15:22 GMT
Sounds like a homework project Jim <G>

Bob

> Michael-
>
[quoted text clipped - 47 lines]
> |
> | Michael beckinsale
Ron de Bruin - 06 Feb 2007 15:34 GMT
Hi Jim

> Until then, I create in the VS editor and copy/paste into the
> Custom UI editor.

Yes this is the best way for big projects.
But for a lot of the the Excel users no option I think.(home users)

I hope the creator of the UI edito will update the program.???

Btw:
I add information on the page about creating your own templates in the UI editor.

Signature

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

> Michael-
>
[quoted text clipped - 41 lines]
> |
> | Michael beckinsale
Jim Rech - 06 Feb 2007 16:29 GMT
>>Yes this is the best way for big projects.

Ron, it doesn't have to be very big before an XML editor pays dividends.

>>But for a lot of the the Excel users no option I think.(home users)

I'm hoping someone with more XML experience than me can jump in with a
recommendation of an XML editor that does what's needed and doesn't cost a
lot.

>>I hope the creator of the UI edito will update the program.???

That would be nice if it met all my criteria.  But I'd certainly expect to
and be willing to pay for such a tool.  Not a small fortune though - maybe
$60-$80 max.

Signature

Jim

| Hi Jim
|
[quoted text clipped - 8 lines]
| Btw:
| I add information on the page about creating your own templates in the UI editor.
Ron de Bruin - 06 Feb 2007 16:35 GMT
Hi Jim

> I'm hoping someone with more XML experience than me can jump in with a
> recommendation of an XML editor that does what's needed and doesn't cost a
> lot.

Yes it is very diffecult to choose one of the editors

> That would be nice if it met all my criteria.  But I'd certainly expect to
> and be willing to pay for such a tool.  Not a small fortune though - maybe
> $60-$80 max.

I agree

Signature

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

>>>Yes this is the best way for big projects.
>
[quoted text clipped - 25 lines]
> | I add information on the page about creating your own templates in the UI
> editor.
Ron de Bruin - 06 Feb 2007 11:46 GMT
Hi Michael

Thanks for thr feedback

>(I know very little about XML)
Me to <g>

Download the Zip with examples again an unzip the files on your desktop.
Rename the file or files and open the files in Notepad.
Edit the XML and save the file.
Then copy it in the same folder as the other examples.

I hope I have time to add a few more examples this week

Signature

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

> Ron,
>
[quoted text clipped - 16 lines]
>
> Michael Beckinsale
Bob Phillips - 06 Feb 2007 11:53 GMT
Hi Ron. You are looking good in that picture <G>.

Bob

> Hi Michael
>
[quoted text clipped - 30 lines]
> >
> > Michael Beckinsale
Ron de Bruin - 06 Feb 2007 12:16 GMT
It is my best picture Bob <g>

Signature

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

> Hi Ron. You are looking good in that picture <G>.
>
[quoted text clipped - 34 lines]
>> >
>> > Michael Beckinsale
michael.beckinsale - 07 Feb 2007 10:17 GMT
Ron / Bob / Jim,

Many thanks for all of your advice & comments, as usual its spot on
and you have addressed the questions l was going to raise as a result
of 'playing around' with XL2007menu customisation.

I have Visio 'somewhere' and will give that a try

Here are some of my comments / observations after 'playing around'. If
l have got anything wrong or if you have any comments to add l would
be gratefull for your reply.

I have now got a few ' XML templates ' that l can use to satisfy the
most frequently menu layouts l use. In my opininion they are not as
user friendly / efficient as the XL2003 & previous versions because
they either require more clicks to access (ie in previous versions ABC
Ltd could be a command bar item and upon clicking the user could
immediately acces their macros via a dropdown/popup.) or they are not
so pleasing to the eye. (this is a matter of opinion, if you like
XL2007 you might think them attractive!)

For presentation purposes l like the client to have their own menu so
in XL2007 l create a custom tab & group.( I assume l am correct in
that you cannot have an 'On Action' attribute within Tab & Group)  I
then have to add buttons to the custom group and have the following
choice:

A) using XML script / callbacksto generate buttons / dropdowns within
the group. This is user friendly for the end user and requires the
same number of clicks. The drawback being the amount of effort
required by the developer who will need to learn XML if they are not
familiar with it.

B) create a button to utilise something like Rons 'MenuMaker'. This
requires an additional click by the user. From a developers view it
involves a very few lines of XML script and everything can then be
added to the menu from within the workbook

I am also looking forward to somebody developing an application that
combines true XML editing and the features of the CustomUIEditor

Regards

Michael beckinsale
Jim Rech - 07 Feb 2007 16:12 GMT
>>XML script

You used that term a couple times, Michael.  I believe it's an oxymoron.
XML is not a script.  It is a markup language for describing structured
data.  A fancy table, if you will.  It is not inherently executable as a
script is, although a program can read it an do anything it wants with it.

>>create a button to utilise something like Rons 'MenuMaker'

Bear in mind that the user has to manually add a button to the QAT and
manually attach the macro to it.  This is somewhat differently than a ribbon
tab appearing automatically when a user opens an Excel workbook or add-in.
So I'd use this approach for making my Personal.xls macros easier for me to
get to but, for an application that's going to be distributed to users, I
think you have to go the RibbonX route.

Signature

Jim

| Ron / Bob / Jim,
|
[quoted text clipped - 40 lines]
|
| Michael beckinsale
Ron de Bruin - 07 Feb 2007 16:19 GMT
> Bear in mind that the user has to manually add a button to the QAT and
> manually attach the macro to it.

The button in the QAT is saved with file Jim as far as I test it on different VPC's with O2007
Do you see something different ?

Signature

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

>>>XML script
>
[quoted text clipped - 56 lines]
> |
> | Michael beckinsale
Jim Rech - 07 Feb 2007 19:53 GMT
Ron-

I find that the "for one workbook" version is saved with the file, so I was
wrong about that.

The "for all workbooks" version is saved in the Excel.qat file so that would
have to be manually added by each user I believe.  Is that correct?

Signature

Jim

|> Bear in mind that the user has to manually add a button to the QAT and
| > manually attach the macro to it.
[quoted text clipped - 62 lines]
| > |
| > | Michael beckinsale
Ron de Bruin - 07 Feb 2007 20:04 GMT
Hi

> The "for all workbooks" version is saved in the Excel.qat file so that would
> have to be manually added by each user I believe.  Is that correct?

Correct Jim, I will make that more clear on the website.

> I find that the "for one workbook" version is saved with the file, so I was
> wrong about that.

http://www.rondebruin.nl/qat2.htm
With this example we can send the file to other users and they can use the button in the QAT
to open the menu.

Btw: Useful thread Jim

Signature

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

> Ron-
>
[quoted text clipped - 77 lines]
> | > |
> | > | Michael beckinsale
Jim Rech - 07 Feb 2007 20:45 GMT
Just one more thing to add Ron<g>...

If you save the "for one workbook" version as an add-in (XLAM) then it
becomes a "for all workbooks" version and a button does not have to be
manually added to the QAT.  This seems like the way to go in the "for all
workbooks" scenario since, I assume, these are utility macros and the user
doesn't need easy access to the workbook with the macros itself.

One thing that bothers me a bit is that, during the beta, MS (Jensen
Harris?) made it very clear they did not want developers sticking their
buttons on the QAT.  That was supposed to up to users to do if they want.
But it so easy to do it is tempting.  Plus I haven't seen anything outside
of the beta discouraging it except maybe Patrick Schmid's 'style' paper
which is not official.

Signature

Jim

| Hi
|
[quoted text clipped - 93 lines]
| > | > |
| > | > | Michael beckinsale
Ron de Bruin - 07 Feb 2007 21:05 GMT
Hi Jim

> If you save the "for one workbook" version as an add-in (XLAM) then it
> becomes a "for all workbooks" version and a button does not have to be
> manually added to the QAT.

I test that this evening and add it also to the site.

> One thing that bothers me a bit is that, during the beta, MS (Jensen
> Harris?) made it very clear they did not want developers sticking their
> buttons on the QAT.  That was supposed to up to users to do if they want.
> But it so easy to do it is tempting.  Plus I haven't seen anything outside
> of the beta discouraging it except maybe Patrick Schmid's 'style' paper
> which is not official.

Yes I remember that.
Maybe they kill me now because I put it online <vbg>

Thanks Jim

Signature

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

> Just one more thing to add Ron<g>...
>
[quoted text clipped - 142 lines]
> | > | > |
> | > | > | Michael beckinsale
Ron de Bruin - 07 Feb 2007 21:32 GMT
Hi Jim

First test as Add-in : I see the button but it will not run the code.
If you choose customize QAT you not see it in the icons list in the  "For all documents list"

Signature

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

> Hi Jim
>
[quoted text clipped - 162 lines]
>> | > | > |
>> | > | > | Michael beckinsale
michael.beckinsale - 08 Feb 2007 10:53 GMT
Ron / Jim,

You learn something everyday. I have never heard of a 'oxymoron' so
just used the word script as it seemed to fit. My apologies.

Jim perhaps l didnt make myself very clear but l think you are
agreeing with me anyway.Perhaps this is clearer:

When l develop a workbook for distribution to end users l want to
avoid them having to add to the QAT (which MS is discouraging), even
if it only needs to be done once. I want the workbook to automatically
create a new tab, group & buttons. On closing the customised tab will
be removed.

My choices are:

A) Full XL Ribbon method - Use XML & callbacks to generate the custom
tab, group & buttons / dropdowns within the group. Each tab, group,
button & dropdown item has to be defined in XML. The appropriate code
is then written in the VBE using the callbacks generated by the Custom
UI Editor. The downside being the amount of effort required by the
developer who may need to learn XML. The benefits being that the end
user uses the same number of clicks to access the macros as in
previous versions of XL.

B) Partial XL Ribbon method - Use the minimum number of XML lines to
create a custom tab, group & button. Use the button callback to invoke
Rons 'MenuMaker'. The benefits of this approach are that most of the
menu building can then be done within the workbook on the 'MenuSheet'
and the resulting popup will be familiar to the end user if upgrading
from previous versions of XL. Downside is that the user will have to
use 1 more mouse click than previously.

For personal use l have created 'MyNewBlankWB-Menu.xlst' which
incorporates Rons 'MenuMaker' so that l can easily develop &
distribute workbooks using method B). I only have to rename the tab,
group & button in XML then add my macro's to the 'MenuSheet' page and
l have a customised XL Ribbon with my defined tab, group & button to
generate the popup.

I am still toying with the idea of a XL.xlst for method A) but cant
decide if its worth the effort as it will probably still need
considerable editing in practice, and Ron's examples cover most
eventualities.

Sorry if its a bit long winded

Regards

Michael Beckinsale.
Ron de Bruin - 08 Feb 2007 11:27 GMT
> When l develop a workbook for distribution to end users l want to
> avoid them having to add to the QAT (which MS is discouraging), even
> if it only needs to be done once. I want the workbook to automatically
> create a new tab, group & buttons. On closing the customised tab will
> be removed.

If you use the "one workbook" example the user not have to add the button to the QAT when you send your workbook
You not have to use xml then

> I am still toying with the idea of a XL.xlst for method A) but cant
> decide if its worth the effort as it will probably still need
> considerable editing in practice, and Ron's examples cover most
> eventualities.

I am working on this Michael

Signature

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

> Ron / Jim,
>
[quoted text clipped - 46 lines]
>
> Michael Beckinsale.
Jim Rech - 08 Feb 2007 13:08 GMT
Ok, Michael, I follow you.<g>

I suppose you could add a choice C - just use Commandbars as in Excel 2003
and direct the user to find your menus on the Add-ins tab.  Not terribly
attractive other than it's very easy.

The thing I liked about Ron's technique is that it provided a way to
seemingly add a dropdown to the QAT, which is something that I do not think
is possible through straight RibbonX.  Of course you're not really adding a
dropdown to the QAT; you're just adding a button that runs a macro that pops
up a menu, but that's splitting hairs.

I must admit I never considered doing the same thing on the ribbon proper,
because RibbonX does support adding menus there...

Ok, now I've considered it.  And I don't really care for it.  For one thing
it doesn't embrace the ribbon, it just co-exists with it.  You apps wouldn't
have the new look, and they wouldn't be able to use the features of the
ribbon that are not possible through Commandbars like gallery controls,
super tooltips, etc.

Now, you've said that one of the downsides of "A", the full XML ribbon
method, is having to learn XML.  Is that really a bad thing?  Haven't you
always sort of wanted to but never had a good reason to?  Now you do<g>.
The ribbon isn't going away any time soon.  Are you going to dodge it the
rest of your professional life? It's really a subset called RibbonX you'd
learn anyway, you don't have to understand all the intricacies of XML proper
by any means.

And guess what, it's not that hard.  Once you get the hang of it (and an XML
editor) it's pretty easy!

Signature

Jim

| Ron / Jim,
|
[quoted text clipped - 46 lines]
|
| Michael Beckinsale.
michael.beckinsale - 08 Feb 2007 14:30 GMT
Jim,

I agree with you entirely, and as you say it isn't really that hard
once you have got the right tools.

If l have to develop a workbook from scratch specifically for XL2007 l
will certainly use the 'Full Ribbon' method.

I now have choice of methods to upgrade workbooks to XL2007.

I have found this thread to be both informative & educational.

Many thanks to all that have contributed.

Regards

Michael Beckinsale
Angie - 20 Apr 2007 23:14 GMT
you people friend good
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.