Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel.Application is not defined error in asp.net application | Excel Programming | |||
Execute a Macro from one excel Application to another Application | Excel Programming | |||
Excel Throwing Circular Errors When No Errors Exist | Excel Worksheet Functions | |||
How to fix application errors | New Users to Excel | |||
macro to close excel application other than application.quit | Excel Programming |