M
Mike B
I have create a form and a button to send emails. The button has the
following code behind it comes back with an Error. The Field that contain
the email address is "email1".
The Error message I get is,
RunTime Error 7980
The HyperlinkAdresss or HyperlinksubAddress property is read-only for this
Hyperlink.
When I do a debug the line below with the "***" is highlighted.
I have used this code before and never had a problem, what did I do wrong?
Thanks,
Mike
~~~~~~~~~~~~~~~~~~~~~~~~~~~
The code is,
Private Sub Command29_Click()
Dim Hlk As Hyperlink
Dim MailStr As String
If Not IsNull([email1]) Then
MailStr = "mailto:" + [email1]
Set Hlk = email1.Hyperlink
Hlk.address = MailStr
Else
MsgBox "Please Enter an E-Mail Address"
MailStr = "mailto:"
Set Hlk = email.Hyperlink
*** Hlk.address = MailStr
Exit Sub
End If
End Sub
following code behind it comes back with an Error. The Field that contain
the email address is "email1".
The Error message I get is,
RunTime Error 7980
The HyperlinkAdresss or HyperlinksubAddress property is read-only for this
Hyperlink.
When I do a debug the line below with the "***" is highlighted.
I have used this code before and never had a problem, what did I do wrong?
Thanks,
Mike
~~~~~~~~~~~~~~~~~~~~~~~~~~~
The code is,
Private Sub Command29_Click()
Dim Hlk As Hyperlink
Dim MailStr As String
If Not IsNull([email1]) Then
MailStr = "mailto:" + [email1]
Set Hlk = email1.Hyperlink
Hlk.address = MailStr
Else
MsgBox "Please Enter an E-Mail Address"
MailStr = "mailto:"
Set Hlk = email.Hyperlink
*** Hlk.address = MailStr
Exit Sub
End If
End Sub