Import External Data & Hyperlink

G

Guest

When importing data from a SQL-Server, I want to create an automatic
hyperlink to one of the cells retrieved from the db. The link can be built
based on the data in the database. When I build the function
"=Hyperlink("http://eskoplanet.esko-graphics.com/planet/wt.aspx?Cmn=calls&Lognr=I00800";"I00800")"
in my query; the cell shows the function. When I afterwards activate the
cell, press F2 + Enter then the link is visible & can be used. But I want to
avoid this.
Thanks in advance
 
G

Guest

This occurs beecause the import bypasses the optional service in the Excel
GUI that "activates" hyperlinks when you type them.

A very simple demo of this is to open Notepad and enter:

http://www.cnn.com

copy this and paste it into Excel. It will paste as "inactive" (that is
un-clickable). For a fix, you need to select the cell, touch F2, and then
touch ENTER.

This can be a pain if you have many of these cells. The following macro
will apply the fix to all cells in a worksheet containing function, thus
activating all hyperlinks:

Sub routine()
For Each r In ActiveSheet.UsedRange
If r.HasFormula Then
r.Select
Application.SendKeys "{F2}"
Application.SendKeys "{ENTER}"
DoEvents
End If
Next
End Sub
 

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