View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default sendmail recipient

Looks good

Are you sure that the activeworkbook on this moment have a sheet named "Options"

If not you can point to the workbook with the code like this

..SendMail ThisWorkbook.Sheets("Options").Range("D21").Value, _
"This is the Subject line"


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Atishoo" wrote in message ...
does anyone know how to get the email function to email a recipient whos
address is in a cell (D21) ?
eg-- how do i get this to work:-

With Dest
.SaveAs TempFilePath & TempFileName & FileExtStr,
FileFormat:=FileFormatNum
On Error Resume Next
.SendMail Sheets("Options").Range("D21").Value, "EPB"
On Error GoTo 0
.Close SaveChanges:=False
End With