Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004

    Unanswered: Help - Check if Range Exists Before Importing

    I am running a regular import process through a menu that determines which files to import based on check boxes. Due to the large number of files I am looping through filenames using variables for months/years etc.

    The problem I have is that some files have data split over 2 sheets and others don't. The named ranges are the same bar a 1 or 2 on the end in all files.

    I am using the Transferspreadsheet command and know that I will get an error on files that don't contain the second range. Is there a way of checking to see if the range exists and run the command if true else goto the next stage in the loop?


  2. #2
    Join Date
    Sep 2004
    I dont no but you can intercept the error with :
    On Error resume next
    Don't forget, after the transfer, this line
    On Error Goto 0

Posting Permissions

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