Excel 2007 Design Mode

J

Josh Sale

I'm migrating my Excel 2003 VBA add-in to Excel 2007 and am having a little
trouble with Excel's Design Mode:

First, I can't manually get Excel 2007 into design mode. I go to the
Developer tab and insert a command button onto the active worksheet. If I
then click the Design Mode button on the ribbon and then try to select the
just inserted command button, Excel tries to run the OnAction macro. I can
keep on clicking the Design Mode button and it doesn't do any good.

Second, my add-in contains code to put Excel into and out of Design Mode.
I've tried the previously published techniques (e.g.,
Application.CommandBars.FindControl(ID:=1605).Execute or
Application.CommandBars("Control Toolbox").Controls("&Design Mode").
Execute) and neither of them work.

Anybody got any ideas?

TIA,

josh
 
J

Jim Rech

Oddly enough, Josh, I don't have either problem. Design mode seems to be
operating just as it did in Excel 2003.

--
Jim
| I'm migrating my Excel 2003 VBA add-in to Excel 2007 and am having a
little
| trouble with Excel's Design Mode:
|
| First, I can't manually get Excel 2007 into design mode. I go to the
| Developer tab and insert a command button onto the active worksheet. If I
| then click the Design Mode button on the ribbon and then try to select the
| just inserted command button, Excel tries to run the OnAction macro. I
can
| keep on clicking the Design Mode button and it doesn't do any good.
|
| Second, my add-in contains code to put Excel into and out of Design Mode.
| I've tried the previously published techniques (e.g.,
| Application.CommandBars.FindControl(ID:=1605).Execute or
| Application.CommandBars("Control Toolbox").Controls("&Design Mode").
| Execute) and neither of them work.
|
| Anybody got any ideas?
|
| TIA,
|
| josh
|
|
 
J

Josh Sale

Thanks Jim!

I'm a dope!!

I went back and tested again and noticed that I was testing with a Form
command button instead of an ActiveX command button. Everything was working
just fine.

FWIW, there's now a better way to accomplish this in Excel 2007:

Application.CommandBars.ExecuteMso("DesignMode")

Thanks again,

josh
 
H

humble programmer

If someone is still stuck with this issue, try right clicking on the Form control button, to select it.



Josh Sale wrote:

Excel 2007 Design Mode
14-Feb-07

I'm migrating my Excel 2003 VBA add-in to Excel 2007 and am having a little
trouble with Excel's Design Mode

First, I can't manually get Excel 2007 into design mode. I go to the
Developer tab and insert a command button onto the active worksheet. If I
then click the Design Mode button on the ribbon and then try to select the
just inserted command button, Excel tries to run the OnAction macro. I can
keep on clicking the Design Mode button and it doesn't do any good

Second, my add-in contains code to put Excel into and out of Design Mode.
I've tried the previously published techniques (e.g.,
Application.CommandBars.FindControl(ID:=1605).Execute or
Application.CommandBars("Control Toolbox").Controls("&Design Mode").
Execute) and neither of them work

Anybody got any ideas

TIA

josh

EggHeadCafe - Software Developer Portal of Choice
Visual Sudio.NET 2003 [Beta 1]
http://www.eggheadcafe.com/tutorial...3e7-2f90fae2a791/visual-sudionet-2003-be.aspx
 

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