closing a vba project - dumb question

A

ajlowndes

I know this is likely to be a dumb question but for all my searching I
cannot find an answer.

You can open a project (in my case one of my excel add-in files) by
double clicking on it - and the filename will be added to the Project
Explorer window in VB, along with all it's modules etc. But how do
you go about closing that add-in file once it is open? The only way I
found was to (save changes to all the other open projects, and) close
excel entirely, then open it again.

Another way I found was to find "ThisWorkbook" and change the
"IsAddin" property to FALSE, which opens the workbook in excel which I
can then close.

Is there an easier way to close a project?
 
C

Clif McIrvin

ajlowndes said:
I know this is likely to be a dumb question but for all my searching I
cannot find an answer.

You can open a project (in my case one of my excel add-in files) by
double clicking on it - and the filename will be added to the Project
Explorer window in VB, along with all it's modules etc. But how do
you go about closing that add-in file once it is open? The only way I
found was to (save changes to all the other open projects, and) close
excel entirely, then open it again.

Another way I found was to find "ThisWorkbook" and change the
"IsAddin" property to FALSE, which opens the workbook in excel which I
can then close.

Is there an easier way to close a project?


Partial answer from one with limited experience: In xl2010, go Developer
Group > Add-ins and de-select the addin in question. I think that closes
the add-in.
 
G

GS

ajlowndes has brought this to us :
I know this is likely to be a dumb question but for all my searching I
cannot find an answer.

You can open a project (in my case one of my excel add-in files) by
double clicking on it - and the filename will be added to the Project
Explorer window in VB, along with all it's modules etc. But how do
you go about closing that add-in file once it is open? The only way I
found was to (save changes to all the other open projects, and) close
excel entirely, then open it again.

Another way I found was to find "ThisWorkbook" and change the
"IsAddin" property to FALSE, which opens the workbook in excel which I
can then close.

Is there an easier way to close a project?

If it's not an installed addin (but just an opened xla file), in the
Immediate Window of the VBE use...
Workbooks("Name_Of_XLA_File").Close False
 

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