CommandbarButton.Execute method not working for drawing shapes

J

Jeff Abbott

In office 2007 my code I use to auto-execute command bar functions don't work
any longer for drawing shapes. Other items like New workbook work fine.

For example, this line of code when executed in the immediate window of
Excel VBA should draw a freeform shape:

excel.CommandBars.FindControl(,200).Execute

The cursor does indeed change to that used for drawing a freeform (ID=200),
and the freeform buttons on the Insert-Shapes ribbon are indeed depressed
just as they are when you manually initiate drawing by clicking on the button.

Any ideas? Is the interface being deprecated?

Any help would be greatly appreciated.

Jeff
 
J

Jim Rech

It looks like we've lost some functionality. Even the new ribbon commands
have the same non-result:

CommandBars.ExecuteMso "ShapeFreeform"

--
Jim
| In office 2007 my code I use to auto-execute command bar functions don't
work
| any longer for drawing shapes. Other items like New workbook work fine.
|
| For example, this line of code when executed in the immediate window of
| Excel VBA should draw a freeform shape:
|
| excel.CommandBars.FindControl(,200).Execute
|
| The cursor does indeed change to that used for drawing a freeform
(ID=200),
| and the freeform buttons on the Insert-Shapes ribbon are indeed depressed
| just as they are when you manually initiate drawing by clicking on the
button.
|
| Any ideas? Is the interface being deprecated?
|
| Any help would be greatly appreciated.
|
| Jeff
 
J

Jeff Abbott

I'm working on upgrading a VB6 application to Office 2007. Is there a
reference or sample COM Add-in that demonstrates how to integrate with the
Fluent UI using VB6?
 
J

Jim Rech

Not really my area but I understand chapter 18 of Stephen Bullen's et al.
book discusses it:

http://www.oaltd.co.uk/Excel2007ProgRef/default.htm

based on his comment at the end of this page:


http://www.dailydoseofexcel.com/arc...er-from-excel-2007-vba-programmers-reference/

--
Jim
| I'm working on upgrading a VB6 application to Office 2007. Is there a
| reference or sample COM Add-in that demonstrates how to integrate with the
| Fluent UI using VB6?
|
| "Jim Rech" wrote:
|
| > It looks like we've lost some functionality. Even the new ribbon
commands
| > have the same non-result:
| >
| > CommandBars.ExecuteMso "ShapeFreeform"
| >
| > --
| > Jim
| > | > | In office 2007 my code I use to auto-execute command bar functions
don't
| > work
| > | any longer for drawing shapes. Other items like New workbook work
fine.
| > |
| > | For example, this line of code when executed in the immediate window
of
| > | Excel VBA should draw a freeform shape:
| > |
| > | excel.CommandBars.FindControl(,200).Execute
| > |
| > | The cursor does indeed change to that used for drawing a freeform
| > (ID=200),
| > | and the freeform buttons on the Insert-Shapes ribbon are indeed
depressed
| > | just as they are when you manually initiate drawing by clicking on the
| > button.
| > |
| > | Any ideas? Is the interface being deprecated?
| > |
| > | Any help would be greatly appreciated.
| > |
| > | Jeff
| >
| >
| >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top