View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
GS[_5_] GS[_5_] is offline
external usenet poster
 
Posts: 226
Default closing a vba project - dumb question

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

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc