gtrplayer5150
New Member
- Joined
- Nov 21, 2005
- Messages
- 16
I'm using the following code to copy 2 sheets of a workbook and email them. Everything works fine but the file that it emails is 3M and it tries to run the code in thisworkbook. I just want to send a snapshot of the two sheets so the recipient can print them out. I've tried using the PastSpecial function but can't get it to work. Any ideas?
thanks
thanks
Code:
Private Sub cmdSend_Click()
Dim wb As Workbook
Dim strdate As String
strdate = Format(Now, "mm-dd-yy")
Application.ScreenUpdating = False
Sheets(Array("8d supplier cover sheet", "#5035e")).Copy
Set wb = ActiveWorkbook
With wb
.SaveAs "Scar Report - " & Sheets("8d supplier cover sheet").Range("b5").Value _
& ".xls"
.SendMail Sheets("8d supplier cover sheet").Range("j1").Value, _
"Scar Number: " & Sheets("8d supplier cover sheet").Range("b5").Value
.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End With
Application.ScreenUpdating = True