ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ActiveWorkbook.SendMail and IE - odd problem (https://www.excelbanter.com/excel-programming/407573-activeworkbook-sendmail-ie-odd-problem.html)

drumstruck

ActiveWorkbook.SendMail and IE - odd problem
 
I added a button to an existing Excel sheet so the user can email the sheet
to me. It works fine if run from Excel.
However, the user accesses the sheet from an ASP menu, delivered via
Internet Explorer. When the user clicks the button, the
ActiveWorkbook.SendMail command works fine. But any VB command after the
SendMail fails.

For example,
Sub crct()
ActiveWorkbook.SendMail _
, ", _
Subject:="correction requested"

Range("d5:e7").ClearContents
Range("d2:d3").ClearContents
End Sub

The Range command gives me "Method Range of object _Global failed".
I get some type of error for ANY command executed after the SendMail
command, but only if run via IE.

Any ideas?
Thanks!




All times are GMT +1. The time now is 12:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com