Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default email certain rows.

How can i send an email from a table which contains data

say....
1 2 3 4 5 6 7
8
a data1-1 data1-2 data1-3 Sent
b data2-1 data2-2 data2-3
c data3-1 data3-2 data3-3 Sent
d data4-1 data4-2 data4-3 Sent
e data5-1 data5-2 data5-3

How can i send only the rows that dont have sent in column 4 and allows me
to modify which other columns i want to ignore. I have 10 columns of data
per row.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default email certain rows.

Hi Sjakkie

You can use Autofilter to filter on column 4 and then use
http://www.rondebruin.nl/mail/folder2/mail4.htm

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


"Sjakkie" wrote in message ...
How can i send an email from a table which contains data

say....
1 2 3 4 5 6 7
8
a data1-1 data1-2 data1-3 Sent
b data2-1 data2-2 data2-3
c data3-1 data3-2 data3-3 Sent
d data4-1 data4-2 data4-3 Sent
e data5-1 data5-2 data5-3

How can i send only the rows that dont have sent in column 4 and allows me
to modify which other columns i want to ignore. I have 10 columns of data
per row.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default email certain rows.

i want something like the following. thought this does not select anything
and gives a big error.


Sub jack()
Dim cnt As Long
Dim lRow As Long 'Last Row

lRow = ActiveSheet.Range("q" & _
ActiveSheet.Rows.Count).End(xlUp).Row
For cnt = 1 To lRow
If ActiveSheet.Range("q" & cnt).Text = "Not Sent" Then
ActiveSheet.Range("cnt").Select





End If

Next cnt


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

' Set the optional introduction field thats adds
' some header text to the email body. It also sets
' the To and Subject lines. Finally the message
' is sent.
With ActiveSheet.MailEnvelope
.Introduction = "This is a sample worksheet."
.Item.To = ""
.Item.Subject = "My subject"
.Item.Send
End With

End Sub

"Ron de Bruin" wrote:

Hi Sjakkie

You can use Autofilter to filter on column 4 and then use
http://www.rondebruin.nl/mail/folder2/mail4.htm

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


"Sjakkie" wrote in message ...
How can i send an email from a table which contains data

say....
1 2 3 4 5 6 7
8
a data1-1 data1-2 data1-3 Sent
b data2-1 data2-2 data2-3
c data3-1 data3-2 data3-3 Sent
d data4-1 data4-2 data4-3 Sent
e data5-1 data5-2 data5-3

How can i send only the rows that dont have sent in column 4 and allows me
to modify which other columns i want to ignore. I have 10 columns of data
per row.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default email certain rows.

If you filter and want to send all visible data on the sheet you can replace this line

Set rng = selection.SpecialCells(xlCellTypeVisible)

With

Set Rng = Sheets("YourSheet").UsedRange.SpecialCells(xlCellT ypeVisible)


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


"Sjakkie" wrote in message ...
i want something like the following. thought this does not select anything
and gives a big error.


Sub jack()
Dim cnt As Long
Dim lRow As Long 'Last Row

lRow = ActiveSheet.Range("q" & _
ActiveSheet.Rows.Count).End(xlUp).Row
For cnt = 1 To lRow
If ActiveSheet.Range("q" & cnt).Text = "Not Sent" Then
ActiveSheet.Range("cnt").Select





End If

Next cnt


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

' Set the optional introduction field thats adds
' some header text to the email body. It also sets
' the To and Subject lines. Finally the message
' is sent.
With ActiveSheet.MailEnvelope
.Introduction = "This is a sample worksheet."
.Item.To = ""
.Item.Subject = "My subject"
.Item.Send
End With

End Sub

"Ron de Bruin" wrote:

Hi Sjakkie

You can use Autofilter to filter on column 4 and then use
http://www.rondebruin.nl/mail/folder2/mail4.htm

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


"Sjakkie" wrote in message ...
How can i send an email from a table which contains data

say....
1 2 3 4 5 6 7
8
a data1-1 data1-2 data1-3 Sent
b data2-1 data2-2 data2-3
c data3-1 data3-2 data3-3 Sent
d data4-1 data4-2 data4-3 Sent
e data5-1 data5-2 data5-3

How can i send only the rows that dont have sent in column 4 and allows me
to modify which other columns i want to ignore. I have 10 columns of data
per row.


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
email entire spreadsheet (unhide rows) bigproblem Excel Discussion (Misc queries) 10 January 1st 09 01:22 AM
Macro to place dated rows in email and send??? PG Oriel Excel Programming 1 October 11th 06 11:05 AM
email rows BPS Excel Discussion (Misc queries) 3 August 23rd 06 10:30 PM
Buttons/1-add rows /2-auto save & name, close, send in email Friday All Nighter's No More-Please HELP Excel Programming 0 August 6th 06 11:07 AM
2 rows of email addresses! andycharger[_6_] Excel Programming 1 January 27th 04 04:04 PM


All times are GMT +1. The time now is 04:56 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"