Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7678959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:45:58+00:00 2026-05-31T17:45:58+00:00

I use VS 2010 for creating Excel 2007 xltx template. I want to remove

  • 0

I use VS 2010 for creating Excel 2007 xltx template. I want to remove all Excel command bars and disable to show them users and add own command bar with my controls. And in some controls I want to call VBA function that will be in this template. I think this operation I must do in :

private void ThisWorkbook_Startup(object sender, System.EventArgs e)
        {
        }

        private void ThisWorkbook_Shutdown(object sender, System.EventArgs e)
        {
        }

Any suggestion? Thanks.
I use VS 2010 for creating Excel 2007 xltx template. I want to remove all Excel command bars and disable to show them users and add own command bar with my controls. And in some controls I want to call VBA function that will be in this template. I think this operation I must do in :

private void ThisWorkbook_Startup(object sender, System.EventArgs e)
        {
        }

        private void ThisWorkbook_Shutdown(object sender, System.EventArgs e)
        {
        }

Any suggestion? Thanks.

UPD1:
I try :

private void ThisWorkbook_Startup(object sender, System.EventArgs e)
        {
            foreach (CommandBar bar in this.Application.ThisWorkbook.CommandBars)
            {
                bar.Visible = false;
                //or  bar.Delete();
            }            
        }

But I get error: System.Runtime.InteropServices.COMException (0x800A03EC): Exception from HRESULT: 0x800A03EC
at Microsoft.Office.Interop.Excel._Application.get_ThisWorkbook()
at T100.ThisWorkbook.ThisWorkbook_Startup(Object sender, EventArgs e) in G:\PROJECTS\T100\T100\ThisWorkbook.cs:line 20
at Microsoft.Office.Tools.Excel.WorkbookImpl.OnStartup()
at Microsoft.Office.Tools.Excel.WorkbookImpl.WorkbookExtensionImpl.Microsoft.Office.Tools.EntryPoint.OnStartup()
at Microsoft.Office.Tools.Excel.WorkbookBase.OnStartup()
at T100.ThisWorkbook.FinishInitialization() in G:\PROJECTS\T100\T100\ThisWorkbook.Designer.cs:line 57
at Microsoft.Office.Tools.Excel.WorkbookBase.Microsoft.Office.Tools.EntryPoint.FinishInitialization()
at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.ExecutePhase(ExecutionPhases executionPhases)
at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.ExecuteCustomization.Microsoft.VisualStudio.Tools.Office.Runtime.Interop.IExecuteCustomization2.ExecuteEntryPoints()

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T17:45:59+00:00Added an answer on May 31, 2026 at 5:45 pm

    Add new ribbon to your project and set this in your ribbon xml

    <ribbon startFromScratch="true">
    

    If you use the ribbon designer you can find startFromScratch property in your properties window set this to “true”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok so I am creating a Macro in Excel 2010. I am looking to
I'm creating a console app in Visual Studio 2010 with c#. I want this
I'm creating an excel add-in and i wanted to use up/down characters in a
I'm creating a website in Visual Studio 2010. I would like to use Visual
I'm creating UML diagrams (use case and class diagrams) in Visual Studio 2010 for
When I compile our project use Delphi 2010 Trial, there has a fatal error
My company is a Software development company. We planned to use TFS 2010 for
Can I use TFS Client 2010 with TFS server 2008? Or it is not
I'm trying to use visual studio 2010. But it seems that the .sln file
Does anyone know if it is possible to use Visual Studio 2010 RC with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.