Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Able to send sheet via VBA but cannot open attachment on receipt

Status
Not open for further replies.

aMember

Programmer
Jun 12, 2002
99
US
I send an attachment with the following code:

myWorkBook = ActiveWorkbook.Name
Sheets(myDASheet).Copy
Application.Dialogs(xlDialogSendMail).Show , myWorkBook
ActiveWorkbook.Saved = True
ActiveWorkbook.Close savechanges:=False
Windows(myWorkBook).Activate

Once I receive it, I cannot open. I get Dr. Watson errors I can open an excel attachment if it was attached from inside outlook ('97).
If it matters, I reference:
VB for Application
MS Excel 8.0 Obj Lib
OLE Automation
MS Office 8.0 Obj Lib
MS Forms 2.0 obj lib
MS DAO 3.51 Obj Lib
Ref Edit Control
VB for extensibility

Any ideas?
 
I had this same problem at one point.
I had checkboxes and a command button from the control toolbox embedded on the spreadsheet. Once I removed the checkboxes, it stopped crashing. I believe I could e-mail the command button without problem though.

HTH
Andrea
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top