Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Range.Address = "$J$1" Then
Call SaveValues
End If
End Sub
Hoping i attached the image...
Compile error.png
The Module runs fine by itself
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.Range.Address = "$J$1" Then
Call SaveValues
End If
End Sub
Hoping i attached the image...
Compile error.png
The Module runs fine by itself
Does SaveValues have required parameters? If not, try without "Call"
Thanks Jorge, Hmm.. does seem to work either.
My other module is this:
Sub SaveValues()
ActiveSheet.Copy
Cells.Copy
Range("A1").PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End Sub
The code you posted works for me. Do you have a private statement in your Module?
Try taking the savevalues sub and putting it on the same worksheet . It should work. Or check that your module doesnt have "Option Private Module".
Oh, I know what it is. Your module is named the same as the procedure "SaveValues". Change the module name and it should work
YES! That's it! Thank you Jorge! (Changed name of module.)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks