Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Excel shuts down after opening dialog

After my vba code (below) displays the SendMail dialog and the email is
sent, Excel displays the message "Excel has encountered a problem and
will shut down". Excel then shuts down and restarts. Does anyone know
why and how to prevent Excel from shutting down?

Thanks.


If MsgBox("Would you like to attach the Sample Report Request to an
email now?", vbYesNo) = vbYes Then
Application.Dialogs(xlDialogSendMail).Show

Else
End If

End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel shuts down after opening dialog

This occurs when Excel encounters an error from which it can't recover. the
obvious answer would be to figure out what is causing it to encounter the
error. Does it encounter the error when you perform this action manually?

--
Regards,
Tom Ogilvy

"JG Scott" wrote in message
ups.com...
After my vba code (below) displays the SendMail dialog and the email is
sent, Excel displays the message "Excel has encountered a problem and
will shut down". Excel then shuts down and restarts. Does anyone know
why and how to prevent Excel from shutting down?

Thanks.


If MsgBox("Would you like to attach the Sample Report Request to an
email now?", vbYesNo) = vbYes Then
Application.Dialogs(xlDialogSendMail).Show

Else
End If

End Sub



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
Opening Excel - getting print dialog box Christina Lynch Excel Discussion (Misc queries) 0 August 31st 08 01:40 AM
Excel 2000 shuts down after opening file thunderbird30 Setting up and Configuration of Excel 1 November 12th 05 03:14 PM
how do i create a dialog box to appear on opening an excel wkbook lallyboo Excel Discussion (Misc queries) 1 October 13th 05 06:52 PM
Running Dialog Sheet when opening Excel File Yacov Excel Programming 1 June 16th 05 05:26 PM
Opening a new mail dialog box in Excel using vba Michelle Excel Programming 3 December 5th 03 03:45 PM


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