I have a macro with the following line:
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 a text"
For Each rngeCell In rngeAddresses.Cells
Set olMail = olApp.CreateItem(olMailItem)
olMail.To = rngeCell.Value
I can use the O.K. button,but by press the CANCEL-button,I receive an errormessage on the line : Set rngeAddresses.....
Can somebody give me a solution ?
Many thanks.
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 a text"
For Each rngeCell In rngeAddresses.Cells
Set olMail = olApp.CreateItem(olMailItem)
olMail.To = rngeCell.Value
I can use the O.K. button,but by press the CANCEL-button,I receive an errormessage on the line : Set rngeAddresses.....
Can somebody give me a solution ?
Many thanks.