View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
QQExcel QQExcel is offline
external usenet poster
 
Posts: 6
Default Position hyperlink in Excel

I'd like to copy a cell value next to hyperlink cell when I click the
hyperlink in Excel. Here is my code and I thought "ActiveCell" will
present the cell contains hyperlink. But it's not, the ActiveCell
points to A1 automatically. How do I point the cell contains
hyperlink? Thank you.

Here is my code:

Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal
Target As Hyperlink)

ActiveSheet.Cells(2, 2) = ActiveCell.Offset(0, 1).Value

End Sub