create a hyperlink field for a tamplate?

N

NEWGUY

I have a template with various fields, when I make use of it, all fields are
displayed correctly.

One of this fields is a text string that holds pathname and file name of a
document related to the record.

I would like to have this string come in as a hyperlink, and not have to go
and manually change each cell in the column with the Insert - Hyperlink
commands.

Does anyone knows how to do this?
 
G

Gord Dibben

NEW

If using Excel 2002 or 2003 you can set this up under Tools>Autocorrect
Options>Autoformat as you type.

For existing strings a formula in an adjacent cell.......

=HYPERLINK(cellref) will return as a hyperlink.

Or you can use a macro to convert all at once.

Sub MakeHyperlinks()
'David McRitchie
Dim Cell As Range
For Each Cell In Selection
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
 

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