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

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
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,213,556
Messages
6,114,284
Members
448,562
Latest member
Flashbond

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