Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Default Macro attached to Autoshape Hyperlink not invoking

Hi
I have a Hyperlink associated with an Autoshape. The purpose of the
hyperlink is to to scroll to another part of the worksheet.
However, I want to target cells of the hyperlink to appear at the top of
the page instead of the bottom.

I found a good suggestion on the forum on how to do this - see below.

If I create a hyperlink on a cell, this works great and I can see that the
macro gets executed.
However for the hyperlink associated with the autoshape, the macro does not
get invoked.

Any Ideas why ? I am using Excel 2003.


1. start with a fresh, brand new, worksheet.
2. select A1 in Sheet1 and pull-down:
a. Insert Hyperlink Place in this document B9
3. click the link to insure we get to B9
4. right-click the tab (sheet name) at the bottom and select View code
5. Paste this in:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Dim s As String
MsgBox ("re-scrolling")
s = ActiveCell.Address(ReferenceStyle:=xlR1C1)
Application.Goto Reference:=s, Scroll:=True
End Sub

Any help appreciated
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
Creating a hyperlink in VBA for an autoshape Jim Excel Programming 3 July 8th 08 07:42 PM
Remove/edit hyperlink attached to object Dave Excel Discussion (Misc queries) 0 August 9th 07 10:50 AM
Invoking a macro from within another jnsaunders Excel Programming 3 May 30th 06 02:16 PM
TextBox Attached to AutoShape Phil H[_2_] Excel Programming 3 March 27th 06 07:49 AM
Hyperlink in AutoShape Gecko Excel Discussion (Misc queries) 5 March 17th 06 01:28 PM


All times are GMT +1. The time now is 11:32 AM.

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

About Us

"It's about Microsoft Excel"