#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Hyperlink VBA

Hi All,

I have VBA to insert and resize a picture. It also adds the file name
to the cell next to it. I would like to have that picture or filename
be automatically hyperlinked to its source. Is that possible?

Thanks in advance!
-Kate

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Hyperlink VBA

Maybe you can modify this:

Option Explicit
Sub testme()

Dim myCell As Range
Dim myRng As Range
Dim myPict As Picture

With Worksheets("Sheet1")
Set myRng = .Range("a1", .Cells(.Rows.Count, "A").End(xlUp))
End With

For Each myCell In myRng.Cells
With myCell
Set myPict = .Parent.Pictures.Insert(.Value)
.Parent.Hyperlinks.Add anchor:=myPict.ShapeRange.Item(1), _
Address:=.Value
End With
Next myCell
End Sub


wrote:

Hi All,

I have VBA to insert and resize a picture. It also adds the file name
to the cell next to it. I would like to have that picture or filename
be automatically hyperlinked to its source. Is that possible?

Thanks in advance!
-Kate


--

Dave Peterson
Reply
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
"paste special" a hyperlink to another worksheet... Guy who thought he knew Excel -) Excel Worksheet Functions 0 September 12th 06 09:45 PM
sort excel spreadsheet with hyperlink jannkatt Excel Discussion (Misc queries) 0 June 13th 06 01:39 PM
Hyperlink function fails when using variable row number Balex Excel Worksheet Functions 5 April 8th 06 06:35 AM
answer to odd results when comparing hyperlink addresses Patricia Shannon Links and Linking in Excel 0 March 9th 06 07:28 PM
Using the Hyperlink Function and finding filenames Jeni Q Excel Worksheet Functions 0 September 20th 05 02:37 PM


All times are GMT +1. The time now is 10:07 PM.

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

About Us

"It's about Microsoft Excel"