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: 921
Default Macro code to open a workbook only when closed

How can I check in a macro subroutine if the status of another file is open
or close. I would like to open another file only when it is not open.
Otherwise, Workbooks.Open Filename:="myfile.xls" simply returns an error
when the file is already open while the macro is running. Thanks a lot in
advance.
 
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
How to code VBA: Auto open workbook and run macro March Excel Discussion (Misc queries) 4 November 8th 07 08:25 PM
I want a macro that can open a worksheet in a closed workbook bigdaddy3 Excel Programming 12 July 19th 05 06:30 PM
Open a closed workbook with VBA ttomlinson Excel Programming 0 May 29th 05 04:39 PM
How: open a workbook with auto macro disabled using code? mike_cutting-edge Excel Programming 1 February 13th 05 06:29 PM


All times are GMT +1. The time now is 02:24 PM.

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"