View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Emailing an Excel sheet?

If you want to send the whole workbook choose another example from my site
http://www.rondebruin.nl/sendmail.htm

Click on the Tips link on the page you choose to see how you can change the To line



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Lime" wrote in message ...
Hello,
I'm using this code from Ron but I want to email all sheeta in the workbook
to the email address in Sheet "Dial" cell J13. But the code is just senting
the Dial sheet. Can you please take a look at the code and give me a hint?

Sub Mail_Every_Worksheet()
Dim sh As Worksheet
Dim wb As Workbook
Dim strdate As String
Application.ScreenUpdating = False
For Each sh In ThisWorkbook.Worksheets
If sh.Range("J13").Value Like "?*@?*.?*" Then
strdate = Format(Now, "dd-mm-yy h-mm-ss")
sh.Copy
Set wb = ActiveWorkbook
With wb
.SaveAs "Sheet " & sh.Name & " of " _
& ThisWorkbook.Name & " " & strdate & ".xls"
.SendMail ActiveSheet.Range("J13").Value, _
"This is the Subject line"
.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End With
End If
Next sh
Application.ScreenUpdating = True
End Sub



"Niek Otten" wrote:

Hi Lime,

http://www.rondebruin.nl/mail/add-in.htm

--
Kind regards,

Niek Otten

"Lime" wrote in message
...
Hello,
I would like to create a macro that will email the excel form to the
address
that is in cell J13. Can someone please help??

Lime