A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Programming
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Help with adding hyperlinks to images



 
 
Thread Tools Display Modes
  #1  
Old April 17th 17, 05:40 PM posted to microsoft.public.excel.programming
PA[_2_]
external usenet poster
 
Posts: 15
Default Help with adding hyperlinks to images

Hi,

I have a code to add hundreds of pictures to a sheet. It works perfectly! Now I need to modify it to add a hyperlink to each picture and I cannot get it to work. Any help is appreciated! The hyperlink is the same link that contains the picture, in this script is the variable FILENAME

Line_dest = n - 1
Filename = Sheets("LISTOFLINKS").Cells(n, 15).Value
Rows(Line_dest).RowHeight = 100
ActiveSheet.Pictures.Insert(Filename).Select
Set shp = Selection.ShapeRange.Item(1)
With shp
.LockAspectRatio = msoTrue
.Width = 180
If .Height > 95 Then .Height = 95
.Cut
End With
Selection.Hyperlinks.Add Anchor:=Selection.ShapeRange.Item(1), Address:=Filename

Thanks
Ads
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding pictures, images or objects darkside7out Excel Discussion (Misc queries) 1 March 10th 10 01:05 AM
Adding images to cells via VB.Net Cartoper Excel Programming 1 May 22nd 08 01:21 PM
How do I extract and save hyperlinks from images in excel Robert in Brisbane Excel Discussion (Misc queries) 4 December 29th 06 12:55 PM
Adding Images NickHK Excel Programming 1 December 22nd 06 10:20 AM
Adding Images Tom Ogilvy Excel Programming 0 December 22nd 06 01:24 AM


All times are GMT +1. The time now is 12:42 AM.


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