Excel 2013 Open new Workbook


How do I open a new workbook in the same window. When I open a workbook it does it in a new window.
This is for my Excel VB.net Add-in which uses task panes.

Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NorieAnalyst Assistant Commented:
Are you opening the workbook manually or with code?
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Manually. My Excel add-in has a task pane. I want to open this and then open an existing workbook in the same instance of Excel. So far the only way I can see to do this is to close all workbooks and then open my file. Is this the only way to do this? I was hoping to find some sort of setting that would force each new open workbook to be in the same instance of Excel
Máté FarkasDatabase Developer and AdministratorCommented:
This should open in the same window (same Excel application instance) of the current active workbook:
ActiveWorkbook.Application.Workbooks.Open "<full path of an excel file>"

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
You should be able to omit the ActiveWorkbook and even the Application part above. So Workbooks.Open "..." should do.
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.