LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to: Open closed workbook/Search data tables/Return data to open workbook Hugh Adams Excel Discussion (Misc queries) 0 August 18th 10 02:04 PM
Day Counting - OPEN & CLOSED Dax Arroway Excel Worksheet Functions 9 November 3rd 08 07:46 PM
copy worksheet from closed workbook to active workbook using vba mango Excel Worksheet Functions 6 December 9th 04 07:55 AM
On open/closed events-and stuff Wandering Mage Excel Programming 3 June 9th 04 02:20 PM
Determine if Workbook is Open or Closed jurgenC![_2_] Excel Programming 2 December 28th 03 10:12 PM


All times are GMT +1. The time now is 08:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"