Importing Table from Excel

G

Guest

Hi,
I would apprecaite guidance of the following:
when importing an excel sheet to creat a new table i loose the details of
the hyperlinks ie i get only the text of the specific cells not the link
details
Thanks
george
 
J

John Nurick

Hi George,

Paste this custom worksheet function into a code module in your
workbook. Then use it in a new column on your worksheet to "expand" the
hyperlinks into text that Access can import to a text or memo field.
Once imported, convert it into a hyperlink field.

Public Function ExpandHyperlink(R As Range, _
Optional AddressOnly As Boolean = False) As Variant

'Converts Excel hyperlink into a string that can be
'imported into an Access text field which can then
'be converted into a hyperlink field.

If R.Hyperlinks.Count > 0 Then
With R.Hyperlinks(1)
ExpandHyperlink = IIf(AddressOnly, .Address, _
.Name & "#" & .Address & "#" & .SubAddress)
End With
Else
ExpandHyperlink = ""
End If
End Function
 

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