Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Add Menus to Application.CommandBars["Cell"] C# without addin

I am hosting an excel application in my winforms project. When I try to
access the commandbars and add a control I get an undetailed failed exception.

attributeMenu =
this.Application.CommandBars["Cell"].Controls.Add(MsoControlType.msoControlButton, "Attribute", Type.Missing, Type.Missing, true);

I can only look at the commandbars and chaneg their properties and I am
unable to add to them. I had to add my menus inside of an excel macroworkbook
but I need to do this in C#. I can not use a vsto addin to do this either
because VSTO doesn't support hosting excel in a winforms application.

How might I add to the Commandbars in excel from C#?

Thanks
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
It's not CommandBars("Cell"), right-click menu! Tetsuya Oguma Excel Programming 1 July 4th 05 07:02 AM
CommandBars("Worksheet Menu Bar").Controls("Tools").Enabled = Fals Arturo Excel Programming 3 May 26th 05 05:44 PM
save and restore "Workbook Menu Bar" & "Cell" menus Jeff Higgins Excel Programming 2 February 14th 05 01:33 AM
Another little ? on CommandBars("Cell") Brownie Excel Programming 1 December 19th 03 05:33 PM


All times are GMT +1. The time now is 02:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"