formating a column

  • Thread starter Thread starter Art
  • Start date Start date
A

Art

I am retrieving data through a SQL query and one of the
data elements is actually a hyperlink.

The cell populates with the entire link reference but it
is not an active hyperlink.

Is there a way to format a cell to let it know the
contents are a hyperlink address?

Thanks

Art
 
Art

In an adjacent column enter =HYPERLINK(cellref)

Drag/copy down the column.

When/if happy, Edit>Copy>Paste Special(in place)>OK

Delete original column.

Alternative..........

Use a macro.

Sub MakeHyperlinks()
'David McRitchie
Dim cell As Range
For Each cell In Intersect(Selection, _
Selection.SpecialCells(xlConstants, xlTextValues))
With Worksheets(1)
.Hyperlinks.Add Anchor:=cell, _
Address:=cell.Value, _
ScreenTip:=cell.Value, _
TextToDisplay:=cell.Value
End With
Next cell
End Sub


Gord Dibben Excel MVP
 
...
I am retrieving data through a SQL query and one of the
data elements is actually a hyperlink.

The cell populates with the entire link reference but it
is not an active hyperlink.

Is there a way to format a cell to let it know the
contents are a hyperlink address?

'Hyperlink' is not a native Jet data type; rather, it applies only in
the MS Access UI. Externally, it is mapped as a 'Memo' data type i.e.
ADO=adWChar. You can test whether a Memo column is a Hyperlink using
e.g. ADOX:

<<column>>.Properties("Jet OLEDB:Hyperlink").Value = True

Jamie.

--
 
Back
Top