Macro sending e-mails

verluc

Well-known Member
Joined
Mar 1, 2002
Messages
1,451
I have a sheet with in column A my e-mail adresses.
With my macro I can send an attachment to all these e-mail adresses,with one touch on a button.
Now a must make an input of the range.
Can somebody change my macro,so that automaticly the range is : A5 to the last row that is filled with an e-mail adresses.
Piece of my macro:
Dim olApp As Object, olMail As Object
Dim rngeAddresses As Range, rngeCell As Range
Set olApp = CreateObject
"Outlook.Application")
Set rngeAddresses = Application.InputBox(prompt:="Give the range of your e-mail adresses."
For Each rngeCell In rngeAddresses.Cells

Many thanks.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
On 2002-04-28 14:47, brettvba wrote:
do you want to be able to selet the range yourself or a set range?
I want that the macro automatckly set the range from A5 to the laste row of column A
(I must have the possibility to add adresses without to change the range)
 
Upvote 0
this is what you want to select the range from a5 downwards

Range("A5").Select
Range(Selection, Selection.End(xlDown)).Select
seletion = rngeaddresses
 
Upvote 0

Forum statistics

Threads
1,214,611
Messages
6,120,510
Members
448,967
Latest member
screechyboy79

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top