Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automating Excel WorkBook With C# Suppress Excel Message Boxes Possible?

I am writing an application that gets data from excel worksheets, it works
fine for most workbooks but when I open some by using the following code:

_xlApp = new Excel.ApplicationClass();

Excel.Workbook WorkBook1 = _xlApp.Workbooks.Open(FilePath,0,true, 5,"",
"", true, Excel.XlPlatform.xlWindows, "\t", false, false, 0, false, false,
false);

Excel produces a message box saying:

Microsoft Office Excel recalculates formulas when opening files last
saved by an earlier version of excel (Yes / NO / Cancel)

Is there any way to suppress these annoying message boxes?

Thank you



  #2   Report Post  
Posted to microsoft.public.excel.programming
jaf jaf is offline
external usenet poster
 
Posts: 300
Default Automating Excel WorkBook With C# Suppress Excel Message Boxes Possible?

Hi,
Add _xlApp.Application.DisplayAlerts=Fales beford the workbook open
statement.
And _xlApp.Application.DisplayAlerts=True after to re-enable.

--

John

johnf202 at hotmail dot com


"unemotionalhumanoid" wrote in message
...
I am writing an application that gets data from excel worksheets, it works
fine for most workbooks but when I open some by using the following code:

_xlApp = new Excel.ApplicationClass();

Excel.Workbook WorkBook1 = _xlApp.Workbooks.Open(FilePath,0,true,

5,"",
"", true, Excel.XlPlatform.xlWindows, "\t", false, false, 0, false, false,
false);

Excel produces a message box saying:

Microsoft Office Excel recalculates formulas when opening files last
saved by an earlier version of excel (Yes / NO / Cancel)

Is there any way to suppress these annoying message boxes?

Thank you





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 You Stop Annoying Excel Message Boxes? Colin Hayes Excel Worksheet Functions 36 January 14th 08 09:44 PM
How do i suppress the message when trying to send mail from xcel sri Excel Discussion (Misc queries) 1 July 5th 06 07:32 PM
Suppress Update Links Message blatham Excel Discussion (Misc queries) 2 April 20th 06 02:34 PM
Suppress 'Clipboard can hold up to 12 items' message [email protected] Excel Discussion (Misc queries) 0 April 15th 05 04:58 PM
suppress popup message walt Excel Programming 4 August 6th 03 05:33 PM


All times are GMT +1. The time now is 06:24 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"