Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
  2. MsgBox "Source: Target.Range.Address " & Target.Range.Address
  3. MsgBox "Source: Target.Range.Value " & Target.Range(1, 1).Value
  4. ' Some more macro stuff here
  5. End Sub
  6.  
  7. Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  8. '~~> Change A1 to the cell which is behind the shape
  9. If Not Intersect(Target, Range("A1")) Is Nothing Then
  10. '~~> Change this to the relevant sheet
  11. With ThisWorkbook.Sheets("Sheet1")
  12. .Visible = xlSheetVisible
  13. .Activate
  14. End With
  15.  
  16. '
  17. '~~> Other Code if required
  18. '
  19. End If
  20. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement