i have a email form sender with a listview and checkmark inside the listview
how do i check if i choosen something from the listview i mean if a person is choosen and when i press the send email button
it will say you didnt choose no one and if it those then it will send a email to the selected persons in the listview
this is my code
how do i check if i choosen something from the listview i mean if a person is choosen and when i press the send email button
it will say you didnt choose no one and if it those then it will send a email to the selected persons in the listview
this is my code
Code:
Private Sub BttnSend_Click()
Dim SendToAll As String, NoEmails As Boolean
LsVw.SetFocus
NoEmails = True
For i = 1 To LsVw.ListItems.Count
If LsVw.ListItems(i).Checked And Len(Trim$(LsVw.ListItems(i).SubItems(1))) <> 0 Then
SendToAll = SendToAll & LsVw.ListItems(i).SubItems(1) & "; "
NoEmails = False
End If
Next
If Not NoEmails Then ShellExecute hwnd, "open", "mailto:" & SendToAll, vbNullString, vbNullString, SW_SHOW
End Sub