View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Excel as Image Browser

I haven't run up against this although I don't do much with hyperlinks.
Where are you hyperlinking to? Post your code that creates the hyperlink.

How are you determining that it is now relative - are you editing it
manually or using code to pull the attribute values for address and
subaddress?

Regards,
Tom Ogilvy

"Darren Hill" wrote in message
...
I'm embarrassed to admit - the puzzle below was because I was in design

mode
by accident. Oops :)

But another problem - I created my hyperlinks with VBA. They were

definitely
absolute references then. But now they same to have changed to relative
references and so the followhyperlink event brings up an error.

Is there a way to force Hyperlinks to remain as absolute references?

--
Darren
"Darren Hill" wrote in message
...
Thanks.
I'll use the SelectionChange to simulate hyperlink behaviour.
Once puzzle: I have the following event, but when I click on a hyperlink
nothing happens.

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Dim sStr As String
sStr = "C:\Documents and Settings\Darren\My Documents\My
Pictures\01.jpg"
Me.ImageBox.Picture = LoadPicture(sStr)

End Sub

I've put a breakpoint in the code to test of the event is actually

firing,
and it isn't. Any ideas?


--
Darren
"Tom Ogilvy" wrote in message
...
There is no built in capability to cancel a hyperlink action.

sStr = "C:\Windows\Mypicture.jpg"
Me.ImageBox.Picture = LoadPicture(sStr)

--
Regards,
Tom Ogilvy

"Darren Hill" wrote in message
...
(Excel2000)

I have a list of image files and their hyperlinks in a spreadsheet.
I'd like to have an image control which floats at the top right of

the
sheet
(I can do that).

When the Hyperlink is clicked, it is cancelled, and the image that

would
have opened is instead loaded into the image control.

1) How do I stop the Hyperlink activating?
2) What code do I need to change the image box picture. The

following
doesn't work.

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
Me.ImageBox.Picture = Target
End Sub

Thanks,

Darren