View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default create email, addresses to be added by user

Hi Carlee,

See Ron de Bruin's sample code at:

http://www.rondebruin.nl/mail/folder1/mail2.htm

and

http://www.rondebruin.nl/mail/folder2/mail2.htm

In either case, insert the following code at the top of
Ron's code:

Dim Res As String

Res = InputBox(Prompt:="Insert recipient's email address", _
Title:="Email Address")

If Res = vbNullString _
Or Not Res Like "*@*" Then
Exit Sub
End If

Then, for the first macro, replace:

.SendMail ", _

with

.SendMail Res, _


For the second macro, replace:

.To = "

with

.To = Res

---
Regards,
Norman


"Carlee" wrote in message
...
Good Day,

Is there a way to email a specific sheet, but do not specify the email
address? I want the user to be able to add the required email addresses
because they will change.

any help would be greatly appreciated.
--
Carlee