View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default Update Autoshape's Hyperlink

Option Explicit

Sub test()
Dim aWS as Worksheet

Dim myShape As Shape
Set aWS = ActiveSheet

on error resume next
set myShape = aWS.shapes("Autoshape3")
on error goto 0

if not myShape is nothing then
myShape.Hyperlink.Address = +
"http://example.com/subscription.asp&refID=x"
End If
End Sub

HTH,
Barb Reinhardt
"Max" wrote:

Hello All,

I have a series of autoshapes with hyperlinks and I'm trying create a macro
which will update the hyperlinks. Here are the requirements:

1) User enters a variable in a dialog box
2) The variable captured will be used in the link (variable = x)
2) Macro updates the autoshape "Autoshape3" replaces old link with the new
link "http://example.com/subscription.asp&refID=x"

I've been trying to search for the right code to update the autoshapes with
the new link, but haven't been able to find it.

Thanks for all your help.