Hi Spike,
Try using the following function:
Function HasLink(WbName As String) As Boolean
HasLink = Not IsEmpty(Workbooks(WbName).LinkSources)
End Function
Sub TestHasLink()
On Error Resume Next
If HasLink("Book1.xlsm") Then
If Err = 9 Then Exit Sub 'If this workbook name is not valid
MsgBox "This Workbook has a link"
Else
MsgBox "No links"
End If
End Sub
Make sure that the parameter you pass as WbName is the name of an open
Workbook, and include the extension i.e .xls or xlsm...