to close a workbook via VBA

  • Thread starter Thread starter J_J
  • Start date Start date
J

J_J

I need to know the code to close a workbook which was opened on XL2003 with
the code line below

Workbooks.Open(strFileName1, Editable:=True).RunAutoMacros
Which:=xlAutoOpen

TIA
J_J
 
Hopefully, XL will give you the necessary code with the procedure
below...
Open a workbook. Create a new workbook. Turn on the macro recorder
(Tools | Macro > Record new macro...). Switch to the first workbook.
Close it. Turn off the macro recorder. Switch to the VBE.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 
Back
Top