Hello,
I am trying to create a column of hyperlinks that either 1) directs to a customer's workbook, or 2) for new customers, creates a new customer workbook and changes the active cell to make it link to their new workbook. I have a macro that completes this task, called NewCustomer, but am having trouble calling it from a link. I am currently working with code that I found online (see below), but cannot make it work. Perhaps I am not putting the link into the cell correctly, or the code in the correct place (private subs go into ThisWorkbook right?). Any help would be greatly appreciated.
I am trying to create a column of hyperlinks that either 1) directs to a customer's workbook, or 2) for new customers, creates a new customer workbook and changes the active cell to make it link to their new workbook. I have a macro that completes this task, called NewCustomer, but am having trouble calling it from a link. I am currently working with code that I found online (see below), but cannot make it work. Perhaps I am not putting the link into the cell correctly, or the code in the correct place (private subs go into ThisWorkbook right?). Any help would be greatly appreciated.
Code:
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Range.Address = "$A$1" Then
MsgBox "it's the hyperlink in A1"
Call NewCustomer
End If
End Sub