![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 1,288
|
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. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Christchurch New Zealand
Posts: 1,030
|
do you want to be able to selet the range yourself or a set range?
|
|
|
|
|
|
#3 | |
|
Board Regular
Join Date: Mar 2002
Posts: 1,288
|
Quote:
(I must have the possibility to add adresses without to change the range) |
|
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Christchurch New Zealand
Posts: 1,030
|
this is what you want to select the range from a5 downwards
Range("A5").Select Range(Selection, Selection.End(xlDown)).Select seletion = rngeaddresses |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|