Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating a hyperlink in VBA for an autoshape | Excel Programming | |||
Remove/edit hyperlink attached to object | Excel Discussion (Misc queries) | |||
Invoking a macro from within another | Excel Programming | |||
TextBox Attached to AutoShape | Excel Programming | |||
Hyperlink in AutoShape | Excel Discussion (Misc queries) |