View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Making Application.CommandBars.ExecuteMso method work in 2007

Hi JeffreyW

I think you are right and it is not working for a gallery.

--

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


"JeffreyW" wrote in message ...
In the Excel 2007 VBA Programmer's Reference (by John Green, Stephen Bullen,
Rob Bovey and Michael Alexander), they state:
-----
"As well as being able to retrieve the state information, you can also click
any built-in control using the new ComandBars.ExecuteMso method. This is
extremely useful for triggering those actions that dont have an object model
equivalent€”such as putting the user in drawing mode to draw a text box on a
sheet:"

Application.CommandBars.ExecuteMso €śTextBoxInsertExcel€ť
-----

While the above works, when I try to use this method with a gallery control,
like:

Application.CommandBars.ExecuteMso "CellStylesGallery"

I expect either the book is wrong (i.e., the method does not apply to "any
built-in control"), or there is some syntax I have wrong in applying this.
Can anyone advise how to make this work?