LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding a hyperlink to a shape

I have been trying to add a hyperlink to a shape using the following in
Excel 2002:


ActiveSheet.Shapes("Object 1").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection.ShapeRange.Item(1),
Address:= _
"http://www.cas.org/"

This code was generated by recording a macro. The hyperlink was successfully
added during the recording, and works just fine.

However, when I run this recorded macro, I get a:

Run-time error '5':
Invalid procedure call or argument

After a little experimentation, I found I can add a Range object as an
Anchor, but not a Shape object as the documentation indicates that I should.

Does anyone have a solution to this problem?

Thanks,

Rand


 
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
my curser changed from arrow shape to a cross shape???? bj New Users to Excel 1 February 5th 07 02:47 PM
Adding a tip when the mouse is hovered over a shape in Excel.... [email protected] Excel Programming 6 August 3rd 06 09:53 PM
Error when using VBA to change hyperlink on a shape matfiej Excel Programming 1 November 20th 04 01:07 AM
Programmatically adding buttons to a worksheet (Shape Object) Phil Excel Programming 3 January 26th 04 03:51 PM
Hyperlink within the TextFrame of Shape Object..? Robert Stober Excel Programming 0 October 12th 03 10:05 PM


All times are GMT +1. The time now is 06:41 AM.

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"