View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
pabs[_21_] pabs[_21_] is offline
external usenet poster
 
Posts: 1
Default check for valid file

I'm using a routine to run thru a list of files and open them to modif
certain things.

here is the chunk of code that open uo the file and activates it

Workbooks.Open WindowName
Windows(WindowName + ".xls").Activate

how can check to see if a file exist before I attempt to open it?

the minute it hist the first line,if the file does not exist..i
crashes.
I need to be able to check first to be able to handle non existin
files.

thanks

Pab

--
Message posted from http://www.ExcelForum.com