Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel crashes on closing after SendMail

Hi Everyone,

the following code:

Set apExcel = New Excel.Application
With apExcel
.Workbooks.Open App.Path & "\test.xls"
.Workbooks(1).SendMail ", "Test"
.Workbooks(1).Close
.Application.Quit
End With
Set apExcel = Nothing


causes Excel to crash on closing (.Application.Quit). The mail is
getting sent successfully.

If I comment .SendMail line, everything works just fine.

I do not know if this info is relevant, but
I am using Thundebird Email and have McAfee virus scan which blocks
port 25 for mass mailing.


Please help,

Alex

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Excel crashes on closing after SendMail

I haven't tried your code but effectively you are doing this

apExcel.Application.Quit

Try removing the .Application. Also probably better to move it outside the
With - End With, ie

apExcel.Quit

Regards,
Peter T

wrote in message
ups.com...
Hi Everyone,

the following code:

Set apExcel = New Excel.Application
With apExcel
.Workbooks.Open App.Path & "\test.xls"
.Workbooks(1).SendMail ", "Test"
.Workbooks(1).Close
.Application.Quit
End With
Set apExcel = Nothing


causes Excel to crash on closing (.Application.Quit). The mail is
getting sent successfully.

If I comment .SendMail line, everything works just fine.

I do not know if this info is relevant, but
I am using Thundebird Email and have McAfee virus scan which blocks
port 25 for mass mailing.


Please help,

Alex



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 "has stopped working" (ie. crashes) on closing programme HC Excel Discussion (Misc queries) 0 March 12th 09 09:47 AM
Excel Crashes after Inserting New Worksheet and Closing the File ttt Excel Discussion (Misc queries) 4 November 16th 05 01:38 PM
Excel crashes after closing workbook James W.[_2_] Excel Programming 1 August 2nd 05 10:09 PM
Closing VB triggers closing Excel Minilek Excel Programming 2 August 6th 04 05:17 PM
Excel 2000 crashes after "touching" a userform with the mouse and closing it Chris J Mercer Excel Programming 0 October 1st 03 08:41 AM


All times are GMT +1. The time now is 04:34 PM.

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

About Us

"It's about Microsoft Excel"