hyperlink image for email

  • Thread starter Thread starter pswanie
  • Start date Start date
P

pswanie

I got a image on a userform. what will the code behide it be to hyperlink
mailto?

this dont work but more or less what i need...

========================================================================
Private Sub Image1_Click()
mailto:[email protected]
subject: suport needed
End Sub
========================================================================
 
You don't need to use code to create an email, right-click the image
and use the Hyperlink option.

Cliff Edwards
 
Yep, it works:

Private Sub Image1_Click()
Dim link As String
link = "mailto:[email protected]"
On Error GoTo NoCanDo
ThisWorkbook.FollowHyperlink Address:=link, NewWindow:=True
Unload UserForm1
Exit Sub
NoCanDo:
MsgBox "Cannot open " & link
End Sub

Cliff Edwards
 

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

Similar Threads


Back
Top