I have an Excel spreadsheet containing a column of hyperlinks that I
need to import into Access. I have no trouble importing (in my case
actually linking) the spreadhsheet to the Access table, however the
column of hyperlinks lose their URL's in transit and no longer are
active links. To try and fix the problem I am using this bit of code
in my Excel spreadsheet to copy the URL of each hyperlink into a new
column that can then be imported into Access:
'Code Starts
Public Function GetURL(R As Range) As Variant
If R.Hyperlinks.Count > 0 Then
GetURL = R.Hyperlinks(1).Address
Else
GetURL = Null
End If
Set C = Nothing
End Function
'Code Ends
The only thing I need help with is figuring out how to change the data
type of this URL field to "hyperlink" once it has been imported. I
know how to do this manually but for the purpose of my database I will
need to do this by VB coding. Any help would be much appreciated!