Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Detecting non-supported files using Excel.Open

Hi, I'm using the Excel Ojbect Library 10.0 (the version which comes
with Office XP) and i'm opening user selected Excel files using
Excel.Open().

However, there is the chance a user will select a non-Excel file to be
opened. Is there a way to programmatically determine when this occurs
so that I won't go through with the processing of the file?

In testing, when I select one of these non-Excel files, a dialog pops
up saying I've opened an unsupported file, do I want to continue . . .

I've tried putting the Excel.Open statement in a try/catch (in C#),
however it seems the program blows by the dialog box and continues to
open the file even though it's unsupported.

Which is weird . . . when debugging, I get the dialog but when I'm not
debugging and just running the exe alone, i don't get the dialog.

Any ideas?

Thanks,
Alfred
Reply
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 do I toggle between 2 open excel files and leave both open Big D in Brighton Excel Discussion (Misc queries) 1 November 6th 08 04:28 PM
Not detecting Open Workbook - Why Roger Excel Discussion (Misc queries) 7 January 26th 08 08:16 PM
Not Detecting Open Workbook Status - Odd?? Jenny B. Excel Discussion (Misc queries) 4 January 16th 08 12:47 AM
How to change default Open/Files of Type to "Microsoft Excel Files Tammy Excel Discussion (Misc queries) 2 January 14th 08 11:06 PM
Detecting if a Window/Workbook is Open Rob Excel Discussion (Misc queries) 5 July 10th 07 10:52 PM


All times are GMT +1. The time now is 12:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"