Hi
I'm trying to add hyperlink from one sheet (Project Overhead) to another sheet (Project Sheet). Some of them are working but one of them is stuck due "type mismatch" error. Here are the code, have been trying to solve it for few hours but no luck.
Appreciate if there someone out there that can give some advise.
I'm trying to add hyperlink from one sheet (Project Overhead) to another sheet (Project Sheet). Some of them are working but one of them is stuck due "type mismatch" error. Here are the code, have been trying to solve it for few hours but no luck.
Code:
' Add OH Link
Dim rngLinkSrc As Range
Dim wsTarget As String
With Worksheets("Project OH").Range("A:A")
Set rngLinkSrc = .Find(strProject)
End With
If Not rngLinkSrc Is Nothing Then
If rngLinkSrc.Hyperlinks.count = 0 Then
[I]Worksheets("Project OH").Hyperlinks.Add _
Anchor:="'Project OH'!" & rngLinkSrc.Address, _
Address:="", _
SubAddress:="'" & strProject & "'" & "!A1", _
TextToDisplay:=strProject[/I]
With selection
.Name = "Calibri"
.Font.Size = 11
.Font.Bold = True
End With
Worksheets(strProject).Select
End If
End If
' End Add Link
Appreciate if there someone out there that can give some advise.