Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
PPL PPL is offline
external usenet poster
 
Posts: 18
Default Excel Application Warinings and Errors

Hi I'm trying to treat an Excel warning through VBA. Can this be done?
Excel Application errors or warnings don't seem to raise error codes in VBA
TIA
Phil


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Excel Application Warinings and Errors


Most warnings can be suppressed by turning off alerts:

Application.DisplayAlerts = False
' your code here
Application.DisplayAlerts = True

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com




On Sat, 6 Mar 2010 08:57:09 -0700, "PPL"
wrote:

Hi I'm trying to treat an Excel warning through VBA. Can this be done?
Excel Application errors or warnings don't seem to raise error codes in VBA
TIA
Phil

  #3   Report Post  
Posted to microsoft.public.excel.programming
PPL PPL is offline
external usenet poster
 
Posts: 18
Default Excel Application Warinings and Errors

Hi Chip,
Thanks for that.
I want to be able to trap the warning with an error/warning code
If Err# = 1234
Then
Do something
End If

Of course this approach is totally doable with VBA errors, but can I trap
application warings/alerts through Event handling for example?

Thanks

Phil

"Chip Pearson" wrote in message
...

Most warnings can be suppressed by turning off alerts:

Application.DisplayAlerts = False
' your code here
Application.DisplayAlerts = True

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com




On Sat, 6 Mar 2010 08:57:09 -0700, "PPL"
wrote:

Hi I'm trying to treat an Excel warning through VBA. Can this be done?
Excel Application errors or warnings don't seem to raise error codes in
VBA
TIA
Phil



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Excel Application Warinings and Errors

There is no way to trap error/warning messages generated by Excel. You
can turn them off with DisplayAlerts, but there is no way to deal with
them programmatically.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com



On Sat, 6 Mar 2010 11:54:09 -0700, "PPL"
wrote:

Hi Chip,
Thanks for that.
I want to be able to trap the warning with an error/warning code
If Err# = 1234
Then
Do something
End If

Of course this approach is totally doable with VBA errors, but can I trap
application warings/alerts through Event handling for example?

Thanks

Phil

"Chip Pearson" wrote in message
.. .

Most warnings can be suppressed by turning off alerts:

Application.DisplayAlerts = False
' your code here
Application.DisplayAlerts = True

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com




On Sat, 6 Mar 2010 08:57:09 -0700, "PPL"
wrote:

Hi I'm trying to treat an Excel warning through VBA. Can this be done?
Excel Application errors or warnings don't seem to raise error codes in
VBA
TIA
Phil


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
Excel.Application is not defined error in asp.net application ravishankar ravi Excel Programming 0 October 23rd 09 06:23 PM
Execute a Macro from one excel Application to another Application Jason Zischke Excel Programming 2 January 30th 08 11:45 AM
Excel Throwing Circular Errors When No Errors Exist MDW Excel Worksheet Functions 1 August 10th 06 02:15 PM
How to fix application errors Apoli New Users to Excel 1 August 8th 06 08:12 PM
macro to close excel application other than application.quit mary Excel Programming 1 September 14th 04 03:43 PM


All times are GMT +1. The time now is 05:18 PM.

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"