April 2006
Beginner
1114 pages
98h 16m
English
listobject.SharePointURL
Returns the full address of the default view of a shared list on the SharePoint server. Causes an error if the list has not been shared. The following code adds a hyperlink to display the web page for a shared list:
Sub AddLink2( )
Dim ws As Worksheet, rng As Range
Dim lst As ListObject, str As String
Set ws = ActiveSheet
Set lst = ws.ListObjects(1)
Set rng = lst.DataBodyRange.End(xlToRight).Offset(-1, 1)
ws.Hyperlinks.Add rng, str, , _
"Click to display list site.", "View list..."
End SubThe preceding code uses the Range object’s End and Offset methods to locate the new hyperlink at the top and to the right of the list on the worksheet.
Read now
Unlock full access