Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default Need help with checkbox to select recipients of an E Maiil via Lotus Notes

I am using a macro (by Ron de Bruin ---thanks Ron) which sends a Lotus E
Mail to various people...No problem so far..
But I would like to be able to have a checkbox that will allow me to pick who
to send to, instead of hardcoding the names in as I do at the moment.

My checkbox skills are nil.

could anyone point me in the right direction.

Thanks in advance

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200704/1

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Need help with checkbox to select recipients of an E Maiil via Lotus Notes

Hi Francois,

Without seeing your existing code, it is difficult to be specific.

However, the following code illustrates a method of returning
a range from checked CheckBoxes from the Forms controls:

'=============
Public Sub Tester()
Dim CBox As CheckBox
Dim Rng As Range
Dim rCell As Range

For Each CBox In ActiveSheet.CheckBoxes
With CBox
If .Value = xlOn Then
If Rng Is Nothing Then
Set Rng = .TopLeftCell
Else
Set Rng = Union(Rng, .TopLeftCell)
End If
End If
End With
Next CBox
If Not Rng Is Nothing Then
For Each rCell In Rng.Cells
MsgBox rCell.Address(0, 0)
Next rCell
End If
End Sub
'<<=============


---
Regards,
Norman




"Francois via OfficeKB.com" <u18959@uwe wrote in message
news:70fa909835f0e@uwe...
I am using a macro (by Ron de Bruin ---thanks Ron) which sends a Lotus E
Mail to various people...No problem so far..
But I would like to be able to have a checkbox that will allow me to pick
who
to send to, instead of hardcoding the names in as I do at the moment.

My checkbox skills are nil.

could anyone point me in the right direction.

Thanks in advance

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200704/1



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Need help with checkbox to select recipients of an E Maiil via Lot

Find attached a sample code which will check whether checkbox is selected or
not. If selected then get caption of checkbox and store in string.

Sub Chk()
Dim strSender As String

If Sheet1.CheckBox1.Value = True Then
strSender = Sheet1.CheckBox1.Caption
End If
If Sheet1.CheckBox2.Value = True Then
strSender = strSender & ";" & Sheet1.CheckBox2.Caption
End If

End Sub

Later, you can use string "strSender" to send mail

Outmail.to = strSender

I suggest you to used listbox or combobox if you have too many selection.
------------------------------------------------------------------------------------
"Francois via OfficeKB.com" wrote:

I am using a macro (by Ron de Bruin ---thanks Ron) which sends a Lotus E
Mail to various people...No problem so far..
But I would like to be able to have a checkbox that will allow me to pick who
to send to, instead of hardcoding the names in as I do at the moment.

My checkbox skills are nil.

could anyone point me in the right direction.

Thanks in advance

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200704/1


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default Need help with checkbox to select recipients of an E Maiil via Lot

Himani wrote:
Find attached a sample code which will check whether checkbox is selected or
not. If selected then get caption of checkbox and store in string.

Sub Chk()
Dim strSender As String

If Sheet1.CheckBox1.Value = True Then
strSender = Sheet1.CheckBox1.Caption
End If
If Sheet1.CheckBox2.Value = True Then
strSender = strSender & ";" & Sheet1.CheckBox2.Caption
End If


Many thanks to you both, I'll give them a try


End Sub

Later, you can use string "strSender" to send mail

Outmail.to = strSender

I suggest you to used listbox or combobox if you have too many selection.
------------------------------------------------------------------------------------

I am using a macro (by Ron de Bruin ---thanks Ron) which sends a Lotus E
Mail to various people...No problem so far..

[quoted text clipped - 6 lines]

Thanks in advance


--
Message posted via http://www.officekb.com

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 via Lotus Notes leerem Excel Discussion (Misc queries) 4 June 2nd 10 05:33 PM
Lotus Notes Steve Excel Discussion (Misc queries) 0 February 25th 09 08:27 PM
Mail über Lotus Notes aus Excel heraus/ Sending Mail with Excel through Lotus Notes [email protected] Excel Programming 0 February 19th 07 12:11 PM
Lotus Notes Newbie Excel Programming 0 September 20th 04 01:55 PM
VBA and Different Lotus Notes versions m@ Excel Programming 0 April 20th 04 08:42 PM


All times are GMT +1. The time now is 12:37 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"