akamax_power
06-12-2008, 09:13 AM
How can i get the following code to work under the sheet followhyperlink sub. I keep getting an "object does not support method" error for the i = Mid(...)
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
With Target
If Target.TextToDisplay = "GoTo" Then
Dim sht As String
Dim i As Integer
Dim idstr As String
i = Mid(Range("A" & Target.Row).Value, 5, 1)
idstr = "2,1," & i
With Sheets("Project Summary")
sht = .Cells.Find(what:=idstr).Offset(0, 2).Value
End With
Sheets(sht).Activate
End If
End With
End Sub
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
With Target
If Target.TextToDisplay = "GoTo" Then
Dim sht As String
Dim i As Integer
Dim idstr As String
i = Mid(Range("A" & Target.Row).Value, 5, 1)
idstr = "2,1," & i
With Sheets("Project Summary")
sht = .Cells.Find(what:=idstr).Offset(0, 2).Value
End With
Sheets(sht).Activate
End If
End With
End Sub