View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Robert Crandal[_2_] Robert Crandal[_2_] is offline
external usenet poster
 
Posts: 158
Default Check for invalid file types?

I am using the FileDialog() function to let users select multiple
files. After the user chooses all their files and presses the
"Okay" button, my program loops to each chosen file.

Is there an effective way to test when a user chooses an
invalid file type? My users are only allowed to choose
plain text files, hopefully files ending in *.txt. I'm just
looking for ideas how to prevent users from choosing
files that contain non-text data.

Thank you!

Robert