Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Turn off error dialogue

I have an Excel ERROR dialogue box that says:
"Excel cannot complete this task with available resources. Choose less
data or close other applications" OK

The code actually finishes and accomplishes its goal though this error
is fired by the code line .SaveAs and by the .SendMail statements.

I have the "On ErrorResume Next and a clear routing but the ERROR
dialogue box still pops up and user has to click OK twice for the code
to finish. All code actions are done so the ERROR seems false.

Here is the code snippet.
With Destwb
'DD Turn Errors off
On Error Resume Next
.SaveAs TempFilePath & TempFileName & FileExtStr,
FileFormat:=FileFormatNum
.SendMail ", _
"This is the Subject line"
'DD added ERROR block/clear
If Err.Number < 0 Then
Err.Clear
End If
'DD reactivate ERRORS
On Error GoTo 0
'On Error Resume Next
.Close SaveChanges:=False
End With

Thanks for the help,
Dennis

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Turn off error dialogue

See reply in your other thread

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"ssGuru" wrote in message ups.com...
I have an Excel ERROR dialogue box that says:
"Excel cannot complete this task with available resources. Choose less
data or close other applications" OK

The code actually finishes and accomplishes its goal though this error
is fired by the code line .SaveAs and by the .SendMail statements.

I have the "On ErrorResume Next and a clear routing but the ERROR
dialogue box still pops up and user has to click OK twice for the code
to finish. All code actions are done so the ERROR seems false.

Here is the code snippet.
With Destwb
'DD Turn Errors off
On Error Resume Next
.SaveAs TempFilePath & TempFileName & FileExtStr,
FileFormat:=FileFormatNum
.SendMail ", _
"This is the Subject line"
'DD added ERROR block/clear
If Err.Number < 0 Then
Err.Clear
End If
'DD reactivate ERRORS
On Error GoTo 0
'On Error Resume Next
.Close SaveChanges:=False
End With

Thanks for the help,
Dennis

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
Can I turn off 0 divide error, for denominator = 0 [email protected] Excel Discussion (Misc queries) 3 December 29th 07 10:05 PM
turn off error handling bernd Excel Programming 2 August 22nd 07 02:39 PM
Global turn-off of Error Checking - little yellow squares Jim May Excel Discussion (Misc queries) 1 August 18th 05 03:47 PM
Simple Error Dialogue box Rob Gould Excel Discussion (Misc queries) 2 March 17th 05 09:13 AM
Way to Turn Off Error Checking on a Range? James Cox[_2_] Excel Programming 2 March 1st 05 06:29 PM


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