Results 1 to 6 of 6

Check if file is open and open if closed

Threaded View

  1. #1
    Registered User
    Join Date
    06-15-2009
    Location
    Isle of Man
    MS-Off Ver
    Excel 2003
    Posts
    27

    Question Check if file is open and open if closed

    Hi,
    I have code which will check if the file "C of S.xls" is open. Ideally, if it is open, the sub will exit but if it it closed, the sub will open "C of S.xls".
    When the file is already open, everything works fine. However, when the file is closed, I get the "subscript out of range, Run time error 9" debug error at the point in the routine where it looks for the "C of S.xls" file.
    How can I avoid this happening?
    I have attached the file.
    Thanks.

    Jockster
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1