Clemo41
07-27-2016, 05:18 AM
Hi Guys,
Ive recently been working on a few things and haven't done VBA in over 10 years and i've got myself a little stuck.
I've tasked myself with the following, and hopefully someone has a very easy solution that doesn't fry my brain any further. I've manged to create a hyper link in Column "U" that once clicked selects data from the active row and from columns "B:K" and emails the data over. All works fine
What i want to do is add a second hyper link in column "AA" that will do the same but email over the active row data from "B:Z"
Also i would like it to include the column titles (currently in Row 4 but not a huge problem if not)
Is this at all possible?
Heres what i have manged so far: (dont laugh if its really bad)
Private Sub Worksheet_FollowHyperlink(ByVal Target As hyperlink)
Range("B" & ActiveCell.Row & ":K" & ActiveCell.Row).Select
MsgBox "Row " & ActiveCell.Row & " Has been emailed"
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Introduction = "Marketing Trigger."
.Item.To = "My Email Address"
.Item.Subject = "New Part Tracking"
.Item.Send
End With
End Sub
Thank you
Ive recently been working on a few things and haven't done VBA in over 10 years and i've got myself a little stuck.
I've tasked myself with the following, and hopefully someone has a very easy solution that doesn't fry my brain any further. I've manged to create a hyper link in Column "U" that once clicked selects data from the active row and from columns "B:K" and emails the data over. All works fine
What i want to do is add a second hyper link in column "AA" that will do the same but email over the active row data from "B:Z"
Also i would like it to include the column titles (currently in Row 4 but not a huge problem if not)
Is this at all possible?
Heres what i have manged so far: (dont laugh if its really bad)
Private Sub Worksheet_FollowHyperlink(ByVal Target As hyperlink)
Range("B" & ActiveCell.Row & ":K" & ActiveCell.Row).Select
MsgBox "Row " & ActiveCell.Row & " Has been emailed"
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Introduction = "Marketing Trigger."
.Item.To = "My Email Address"
.Item.Subject = "New Part Tracking"
.Item.Send
End With
End Sub
Thank you