I have been searching on several forums to find a way to attach a DYNAMIC hyperlink to a shape or an image in Excel 2007.
I have find the following "solution" which worked for me in a NEW/clean workbook.
Sub Picture33_Click()
Worksheets(1).Range("B31").Hyperlinks(1).Follow NewWindow:=True
End Sub
BUT, when I copied this into the workbook, I already was working on, everytime I got an error in line 2.
Can somebody tell me what I should do to solve this ? Does it have something to do with the location I copied the code to (workbook instead of module) ? PLEASE HELP !
(the DYNAMIC hyperlink is located in cell B31 and should be activated when clicked on Picture33). I guess, since the hyperlink should be dynamic, the HYPERLINK function is not an alternative.
Hi,
What is the error and what do you have in B31?What is supposed to happen?
cell B31 will be something like http://www.google.com or to make it more dynamic ="http://www.google.com/"&A1 ... in which A1 relates to the string with the search term. It should open the webbrowser with the http-address.
As far as the error is concerned: "run time error "9" subcript out of range"
Last edited by patrickw; 02-26-2011 at 02:00 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks