Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 129
Default Hyperlink target should equal parent

Hi,

testing in excel 2000 on my pc, a shape with hyperlink seems not to fire
the event. (and, not to run the macro assigned to it)

how about setting a hyperlink in the cell that lies under the upper-left
corner of the shape, and assigning a macro to the shape, like this:

'shape's name needs to be unique on the sheet.

Sub HyperlinksShape_Click()
ActiveSheet.Shapes(Application.Caller).TopLeftCell .Hyperlinks(1).Follow
End Sub

--
HTH,

okaizawa


Peanut_1999 wrote:
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyperlink with a target - is it possible?? splinx Excel Worksheet Functions 0 February 16th 09 03:28 PM
scrolling target cell to top of page after hyperlink BROCK8292 Excel Discussion (Misc queries) 6 September 21st 07 05:22 PM
Hyperlink target jacque Excel Discussion (Misc queries) 2 June 23rd 07 05:20 PM
Set 'target' for hyperlink Techno~ Excel Discussion (Misc queries) 0 August 16th 06 04:29 PM
Confirm target cell is equal Pat Excel Discussion (Misc queries) 2 December 8th 04 09:35 PM


All times are GMT +1. The time now is 02:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"