View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Vasant Nanavati Vasant Nanavati is offline
external usenet poster
 
Posts: 1,080
Default How can I close a workbook using VBA?

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

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

--

Vasant


"Trevor" wrote in message
...
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