Activate web link via image object

M

MIKESX

I have two cell that are joined via concatenation. Together they
produce a hypertext link.

The cell actually displays: "ACTIVATE WWW LINK."

The cell actually contains :
=HYPERLINK(LOOKUP(H20,'DOWNLOAD-CALC'!FM3:FM27,'DOWNLOAD-CALC'!FN3:FN27)&E16,"ACTIVATE
WWW LINK")

And the two concatatated cells produce:
http://secinfo.com/$/search.asp?find=MTSX

The link point-too address's and the stocks ticker symbol constantly
change.

I want to activate the link using a visual or image object (button).

Can you use the assign hypertext link function when you right click a
visual object in excel and format the hypertext cell in a manor that
connects the two cells referenced componments and functions as a link?

Or do I need a VBA macro that activate that cell and thus fetch the
requested page in the Safari browser on my computer.

The macro recorder will allow me to record the process but does not
fetch the page when played back.

I would think that all I would need for the VBA macro to do is click or
activate the cell? Can't find a way to do that. Tried Activate Cell
address. Nothing

I have searched several forums for something simular. Became more time
effective to ask.

Thanks for any suggestions.
 
N

NickHK

You can assign a macro to the picture
Sub HyperLinkedPicture
Dim SourceWS as Worksheet
Set SourceWS =Worksheets("DOWNLOAD-CALC")
With ActiveSheet
ThisWorkbook.FollowHyperlink
Application.Worksheetfunction.Lookup(.Range("H20"),SourceWS.Range("FM3:FM27)
,SourceWS.Range("FN3:FN27")) & .Range("E16")
End With
End Sub

NickHK
 
M

MIKESX

Hi NickHK:

Thank you for your assistance. Here is what I put into the spreadsheet
marcos.

Sub HyperLinkedButton()
Dim SourceWS As Worksheet
Set SourceWS = Worksheets("DOWNLOAD-CALC")
With ActiveSheet
ThisWorkbook.FollowHyperlink

Application.Worksheetfunction.Lookup(.Range("H20"),SourceWS.Range("FM3:
FM27"),SourceWS.Range("FN3:FN27"))&.Range("E16")
End With
End Sub

Your code seems short and sweet. I don't know if it works as yet,
because I am getting a compile error that highlights the"&" and says it
was expecting an "=" sign.???

Any ideas? I am on a Mac running Microsoft Office 2004. OSX 10.3.9.
 
N

NickHK

Seems the code became unfortunately split. This is all a single line however
it look in your reader:
ThisWorkbook.FollowHyperlink
Application.Worksheetfunction.Lookup(.Range("H20"),SourceWS.Range("FM3:
FM27"),SourceWS.Range("FN3:FN27"))&.Range("E16")

NickHK
 
M

MIKESX

Hi Nick:

All one line, same error. Still wants an equal sign where the
amperzand is.

Michael
 
N

NickHK

The only way I get that error is NOT putting ALL the text on one line. But
does work ?
Dim TempStr As String

With ActiveSheet
TempStr =
Application.WorksheetFunction.Lookup(.Range("H20"),SourceWS.Range("FM3:FM27"
),SourceWS.Range("FN3:FN27"))&.Range("E16")
.FollowHyperlink TempStr
End With

By the way it's advisable to VLookUp instead of LookUp.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top