View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Peanut_1999 Peanut_1999 is offline
external usenet poster
 
Posts: 1
Default Hyperlink target should equal parent

Hi

I set up a successful spreadsheet using hyperlinks on a 'league table'.
When activated the hyperlink takes you to another spreadsheet within
the workbook and populates the target cell with the name from the
original hyperlink cell. I then have lookup formulae within a table
below to show all perfomance criteria / achievement for the person
selected from the 'league table'.

The macro I used is:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Dim source_value
Dim varsplit
source_value = Target.Parent.Value
varsplit = Split(Target.SubAddress, "!")
Worksheets(varsplit(0)).Range(varsplit(1)).Value = source_value
End Sub

(which I copied from one of these topics)

However, I have amended the spreadsheet to incorporate new people and
re-vamped it a bit but now the macro doesn't seem to work. Apart from
peoples names and formatting, there isn't much difference.

One of the things I've changed is using shapes with hyperlinks as page
selecting buttons instead of ordinary rectangular buttons with code.
Could this be the cause?

I'm pretty useless at this kind of thing and have learnt all that I
know from asking questions, so please go easy on the technical
language.

Many Thanks
Peanut