View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ttomlinson ttomlinson is offline
external usenet poster
 
Posts: 1
Default Open a closed workbook with VBA


I have managed to open the workbook but not close it

to open I am using the code

Application.Workbooks.Open ("E:\Documents an
Settings\Trevor\Desktop\B.xls")

This works fine. How do I close though I have tried

Application.Workbooks("E:\Documents an
Settings\Trevor\Desktop\B.xls").Close

and

Application.Workbooks.Close("E:\Documents an
Settings\Trevor\Desktop\B.xls")

neither work.

Where have I gone wrong there?

Thanks
Tre

--
ttomlinso
-----------------------------------------------------------------------
ttomlinson's Profile: http://www.excelforum.com/member.php...fo&userid=2383
View this thread: http://www.excelforum.com/showthread.php?threadid=37490