How can I close a workbook using VBA?

  • Thread starter Thread starter Trevor
  • Start date Start date
T

Trevor

I have a workbook open that contains a macro which needs
to access another workbook. I have added code to open the
workbook and perform the necessary functions, but how do I
then close that workbook while leaving the active one open
to continue with execution? The file I need to open and
subsequently close is called 'coll codes.xls'.

Any help would be appreciated.

Thanks,

Trevor
 
Workbooks("coll codes.xls").Close True 'False

Use the True parameter if you want changes saved; False otherwise.
 
Back
Top