Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21920

[RESOLVED] how to check if a person in the listview is choosen

$
0
0
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
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


Viewing all articles
Browse latest Browse all 21920

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>