Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Use a variable with Sendmail ?

Private Sub ComboBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
ActiveWorkbook.SendMail ComboBox1.Value
End Sub

with a combobox from the control toolbox you can use this.
When you double click on the combobox after you choose the address it
will send the mail

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Joe 90" wrote in message ...
Have been working up an app and need to send emails from it.

Using Sendmail I can happily email colleagues if I use the prescribed
syntax:

Activeworkbook.Sendmail "Joe 90" (with Joe 90 being a valid name)

However I want to chose a name from a list in a combobox, place that name in
a variable and use that variable to send the email with:

dim name

name = Combobox1.Value (have left out the rest of the defining info, e.g.
workbook,worksheet etc)

Activeworkbook.Sendmail name

This doesn't work (even though I make sure all the inverted commas are there
in the name variable)

Is there a way to do this?

Cheers

Joe 90




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Use a variable with Sendmail ?

Ron

Many thanks. Of course, that was the one thing I didn't try (and should
have), which was simply using the full reference e.g. ComboBox1.value to
replace the valid name. it's oh so simple now you tell me!

Thanks again

Joe 90

"Ron de Bruin" wrote in message
...
Private Sub ComboBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
ActiveWorkbook.SendMail ComboBox1.Value
End Sub

with a combobox from the control toolbox you can use this.
When you double click on the combobox after you choose the address it
will send the mail

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Joe 90" wrote in message

...
Have been working up an app and need to send emails from it.

Using Sendmail I can happily email colleagues if I use the prescribed
syntax:

Activeworkbook.Sendmail "Joe 90" (with Joe 90 being a valid name)

However I want to chose a name from a list in a combobox, place that

name in
a variable and use that variable to send the email with:

dim name

name = Combobox1.Value (have left out the rest of the defining info,

e.g.
workbook,worksheet etc)

Activeworkbook.Sendmail name

This doesn't work (even though I make sure all the inverted commas are

there
in the name variable)

Is there a way to do this?

Cheers

Joe 90






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sendmail Eef New Users to Excel 4 March 23rd 09 05:55 PM
Sendmail Mattlynn via OfficeKB.com Excel Discussion (Misc queries) 4 August 8th 08 12:21 PM
sendmail Noemi Excel Discussion (Misc queries) 0 February 10th 06 01:59 AM
Ron DeBruin's Sendmail Ken G. Excel Discussion (Misc queries) 1 October 18th 05 03:54 PM
SendMail Question Andy Tallent Excel Discussion (Misc queries) 8 May 19th 05 04:36 PM


All times are GMT +1. The time now is 05:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"