I found this thread that had the code that worked just fine for me...except
excel-general/1080328-hyperlink-mailto-email-that-will-deliver-cell-range-results
however, I am trying to have three cells with links that I can send the exact same range to different email based on the link I clicked.
I have tried to add a number after the such as: Private Sub Worksheet_FollowHyperlink1 and past the new code below with a 2 etc. however when I do that all the links do nothing.
This is my first time using VBA I tried a basic formula however, from my research you can not past a range in the email subject.
I would also be willing to use one link vs. three and just have the to line blank. I tried to no put an email in the to line and all I got was the range pasted in the to line on the email.
My links reference back to themselves and are in cells AA5, AB5, AC5 and the range I am trying to copy is AA6:AF144
Below is the code i can get to work for the first thread
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Select Case Target.Range.Address
Case "$AA$5"
Range("AA6:AF143").Copy
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = "email"
.CC = ""
.BCC = ""
.Subject = "Vessel Update"
.Display
End With
OutMail.Subject.Activate
Application.SendKeys "^v"
On Error GoTo 0
Set OutMail = Nothing
End Select
Bookmarks