Hello,
I have 3 columns that contain hyperlinks (to self (ie. cell A1 hyperlink points to A1 and titled View)). Each column's hyperlink should call a different macro to goto a report page to look at a dated report (pic below). When I run each macro individually, they run without error. However, when I try to use a If...ElseIf....ElseIf....Else type entry, nothing appears to happen. The If....Else code is entered on the reports spreadsheet itself and not into a module.
Does anyone see anything obvious as to why this wouldn't call the macro correctly? If I select, for example, the 3rd "view" down in the first column containing hyperlinks, I should be taken to the Load Mgmt reports page where I have a vlookup table setup to display the results based on the Request ID (far left). Again, it works perfectly if I manually run the macro.
Many Thanks,
Shane
I have 3 columns that contain hyperlinks (to self (ie. cell A1 hyperlink points to A1 and titled View)). Each column's hyperlink should call a different macro to goto a report page to look at a dated report (pic below). When I run each macro individually, they run without error. However, when I try to use a If...ElseIf....ElseIf....Else type entry, nothing appears to happen. The If....Else code is entered on the reports spreadsheet itself and not into a module.
Does anyone see anything obvious as to why this wouldn't call the macro correctly? If I select, for example, the 3rd "view" down in the first column containing hyperlinks, I should be taken to the Load Mgmt reports page where I have a vlookup table setup to display the results based on the Request ID (far left). Again, it works perfectly if I manually run the macro.
Code:
Code:
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Range.Address = "$N$5:$N$17" Then
Call lmreps
ElseIf Target.Range.Address = "$O$5:$O$17" Then
Call rlreps
ElseIf Target.Range.Address = "$P$5:$P$17" Then
Call viewers
End If
End Sub
Many Thanks,
Shane