![]() |
How to employ ExecuteMso Sub in Excel 2007?
Since ExecuteMso does not work with gallery controls (apparently) the only
other option I can think of is sendkeys: Sub aa() SendKeys "%H" SendKeys "J" End Sub -- Jim "JeffreyW" wrote in message ... | As I found out in an earlier post at: | | http://msdn.microsoft.com/newsgroups...=en-us&m=1&p=1 | | ... the Application.CommandBars.ExecuteMso method apparently does not work | with a Gallery Control in Excel 2007. | | I subsequently came across this info at: | | http://msdn2.microsoft.com/en-us/library/aa722523.aspx | | "The Application.CommandBars class provides the following methods for | interacting with Fluent UI controls. | | Table 1. Methods for the Application.CommandBars class | Method | Description: | | Sub ExecuteMso(idMso As String) | Executes the command that is specified in | idMso." | | I seem to have problems getting this to work with a Gallery control as well | - maybe because of the same issue as above or maybe because I am messing | something up. Can anyone suggest how I might successfully use this method to | call a Gallery Control like "CellStylesGallery" (which is a correct idMSO)? | | Thanks for any insights. | | Jeff |
How to employ ExecuteMso Sub in Excel 2007?
Thanks for posting, Jim. I was hoping someone might be able to show me the
error of my ways so I could employ the "Sub ExecuteMso(idMso As String)" procedure to execute a Gallery control ... but if the documentation in "Customizing the 2007 Office Fluent Ribbon for Developers (Part 3 of 3)" link above is wrong (or incomplete) and that's not possible, I might have to resort to using SendKeys but would prefer to avoid it if possible due to possible Windows timing issues. Jeff "Jim Rech" wrote: Since ExecuteMso does not work with gallery controls (apparently) the only other option I can think of is sendkeys: Sub aa() SendKeys "%H" SendKeys "J" End Sub -- Jim "JeffreyW" wrote in message ... | As I found out in an earlier post at: | | http://msdn.microsoft.com/newsgroups...=en-us&m=1&p=1 | | ... the Application.CommandBars.ExecuteMso method apparently does not work | with a Gallery Control in Excel 2007. | | I subsequently came across this info at: | | http://msdn2.microsoft.com/en-us/library/aa722523.aspx | | "The Application.CommandBars class provides the following methods for | interacting with Fluent UI controls. | | Table 1. Methods for the Application.CommandBars class | Method | Description: | | Sub ExecuteMso(idMso As String) | Executes the command that is specified in | idMso." | | I seem to have problems getting this to work with a Gallery control as well | - maybe because of the same issue as above or maybe because I am messing | something up. Can anyone suggest how I might successfully use this method to | call a Gallery Control like "CellStylesGallery" (which is a correct idMSO)? | | Thanks for any insights. | | Jeff |
All times are GMT +1. The time now is 11:02 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com