emailing everyone on the list

P

PaddyMac

I want to email everyone on the list, rather than having to click on them one
by one with the following command button.

Private Sub cmdAdd_Click()
Dim i As Integer
For i = 0 To lstEmployees.ListCount - 1
If lstEmployees.Selected(i) = True Then
lstAttendees.AddItem _
lstEmployees.List(i)
lstEmployees.Selected(i) = False
End If
Next i
cmdRemoveAll.Enabled = True
End Sub

Any ideas.

Kindest regards

PaddyMac
 
T

Tim Williams

Just remove the check on whether an employee item is selected or not.

Private Sub cmdAddAll_Click()
Dim i As Integer
For i = 0 To lstEmployees.ListCount - 1
lstAttendees.AddItem lstEmployees.List(i)
Next i
cmdRemoveAll.Enabled = True
End Sub

Tim
 
P

PaddyMac

 Just remove the check on whether an employee item is selected or not.

Private Sub cmdAddAll_Click()
    Dim i As Integer
    For i = 0 To lstEmployees.ListCount - 1
        lstAttendees.AddItem lstEmployees.List(i)
    Next i
    cmdRemoveAll.Enabled = True
 End Sub

Tim










- Show quoted text -

Tim

If works!

Many thanks.

Kindest regards

PaddyMac
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top