Hi guys,
I am trying to run macro through hyperlink and when trying to do that its giving me a run time error. Below is the code that i am trying to implement.
Option Explicit
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Not Intersect(Range(Target.parent.Address), Range("$I$4:$I$5000")) Is Nothing Then
Dim rng As Range
ActiveCell.Offset(0, -7).Copy
Set rng = Sheets("Sheet1").Range("A1")
rng.Offset(0, 0).Paste
MacroName
Exit Sub
End If
End Sub
its giving me an error at the following code->
ActiveCell.Offset(0, -7).Copy
Currently I have enabled the following references:
Visual Basic For Application
Microsoft Excel 12.0 Object Library
OLE Automation
Microsoft Office 12.0 Object Library
Microsoft Forms 2.0 Object Library
Windows Script Host Object Model
thanks in advance guys...
Cheers
plasma33
Bookmarks