S
Stockwell43
Hello,
I downloaded the emailsenate2k database from this site:
http://www.datastrat.com/DataStrat2.html
If I make a selection in the email address and click the email button it
works fine. When I de-selected the email address I get an error. My concern
is that the user my make a selection then decide that was the wrong email
address and de-select and get this error and I don't want this to pop up
because I don't want them to mess with anything. Any help would be
appreciated.
Here is the error I get:
Run-Time Error '5': Invalid procedure call or argument
In the code below, this is what is highlighted in yellow:
strList = Left$(strList, Len(strList) - 1)
And this is the code behind the click enevet in the list box:
Private Sub lstMailTo_Click()
Dim varItem As Variant
Dim strList As String
With Me!lstMailTo
If .MultiSelect = 0 Then
Me!txtSelected = .Value
Else
For Each varItem In .ItemsSelected
strList = strList & .Column(0, varItem) & ";"
Next varItem
strList = Left$(strList, Len(strList) - 1)
Me!txtSelected = strList
End If
End With
End Sub
I downloaded the emailsenate2k database from this site:
http://www.datastrat.com/DataStrat2.html
If I make a selection in the email address and click the email button it
works fine. When I de-selected the email address I get an error. My concern
is that the user my make a selection then decide that was the wrong email
address and de-select and get this error and I don't want this to pop up
because I don't want them to mess with anything. Any help would be
appreciated.
Here is the error I get:
Run-Time Error '5': Invalid procedure call or argument
In the code below, this is what is highlighted in yellow:
strList = Left$(strList, Len(strList) - 1)
And this is the code behind the click enevet in the list box:
Private Sub lstMailTo_Click()
Dim varItem As Variant
Dim strList As String
With Me!lstMailTo
If .MultiSelect = 0 Then
Me!txtSelected = .Value
Else
For Each varItem In .ItemsSelected
strList = strList & .Column(0, varItem) & ";"
Next varItem
strList = Left$(strList, Len(strList) - 1)
Me!txtSelected = strList
End If
End With
End Sub