Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Emailing Cell contents in EXCEl using VB


I have an email script in VB but want it to just email the contents of
cell a2 and l2. Can anyone help? My current code is



Sub Send_Range()

' Select the range of cells on the active worksheet.
ActiveSheet.Range("L2").Select

' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True


With ActiveSheet.MailEnvelope
.Introduction = "Please can you add the following to xxxxxxxxxxxx"
& vbCrLf & vbCrLf _
& "xxxxxxxxxxx- work stage " &
Worksheets("PM6").Range("l3").Value
.Item.To = "
.Item.cc = "
.Item.Subject = "Additional xxxxxxxxxxxx- work stage " &
Worksheets("PM6").Range("l3").Value

' .Item.Send

MsgBox "Please check that that contents of the subject box and
introduction are correct before pressing SEND.", vbOKOnly +
vbInformation


End With
End Sub



*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Emailing Cell contents in EXCEl using VB

Hi Ian

Use this
http://www.rondebruin.nl/mail/folder3/smallmessage.htm

See this how you can use range values
http://www.rondebruin.nl/mail/tips2.htm



--

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


"ian lewis" wrote in message ...

I have an email script in VB but want it to just email the contents of
cell a2 and l2. Can anyone help? My current code is



Sub Send_Range()

' Select the range of cells on the active worksheet.
ActiveSheet.Range("L2").Select

' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True


With ActiveSheet.MailEnvelope
.Introduction = "Please can you add the following to xxxxxxxxxxxx"
& vbCrLf & vbCrLf _
& "xxxxxxxxxxx- work stage " &
Worksheets("PM6").Range("l3").Value
.Item.To = "
.Item.cc = "
.Item.Subject = "Additional xxxxxxxxxxxx- work stage " &
Worksheets("PM6").Range("l3").Value

' .Item.Send

MsgBox "Please check that that contents of the subject box and
introduction are correct before pressing SEND.", vbOKOnly +
vbInformation


End With
End Sub



*** Sent via Developersdex http://www.developersdex.com ***

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Emailing Cell contents in EXCEl using VB

hi,
See this site....
http://www.rondebruin.nl/sendmail.htm

regards
FSt1

"ian lewis" wrote:


I have an email script in VB but want it to just email the contents of
cell a2 and l2. Can anyone help? My current code is



Sub Send_Range()

' Select the range of cells on the active worksheet.
ActiveSheet.Range("L2").Select

' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True


With ActiveSheet.MailEnvelope
.Introduction = "Please can you add the following to xxxxxxxxxxxx"
& vbCrLf & vbCrLf _
& "xxxxxxxxxxx- work stage " &
Worksheets("PM6").Range("l3").Value
.Item.To = "
.Item.cc = "
.Item.Subject = "Additional xxxxxxxxxxxx- work stage " &
Worksheets("PM6").Range("l3").Value

' .Item.Send

MsgBox "Please check that that contents of the subject box and
introduction are correct before pressing SEND.", vbOKOnly +
vbInformation


End With
End Sub



*** Sent via Developersdex http://www.developersdex.com ***

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel cell shading turns black when emailing Exact Accounts Excel Discussion (Misc queries) 1 June 3rd 09 10:33 AM
concatenate contents of cells whose contents resemble cell referem cathyh Excel Worksheet Functions 3 May 23rd 09 12:16 PM
Macro to clear range contents when cell contents are changed by us Steve E Excel Programming 12 February 22nd 07 09:09 PM
Emailing an Excel cell range Manuel Excel Programming 1 December 23rd 05 05:20 AM
Macro to remove contents of cell and move all other contents up one row adw223 Excel Discussion (Misc queries) 1 July 1st 05 03:57 PM


All times are GMT +1. The time now is 02:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"