ActiveWorkbook.SendMail and IE - odd problem

D

drumstruck

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 _
Recipients:="(e-mail address removed), (e-mail address removed)", _
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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top