Showing posts with label external links. Show all posts
Showing posts with label external links. Show all posts

Saturday, April 19, 2014

Break External Workbook Links

Macro to break External Workbook Links -


Sub break_external_links()
    Dim extlinks
    Dim j As Long
    extlinks = ThisWorkbook.LinkSources(xlExcelLinks)
    If Not IsEmpty(extlinks) Then
        For j = LBound(extlinks) To UBound(extlinks)
            ThisWorkbook.BreakLink Name:=extlinks(j), Type:=xlLinkTypeExcelLinks
        Next
    End If
    
    
End Sub

Display External Links if any in the workbook

Macro to pop-up the full path of external workbooks used in the formula's 

Sub external_lins()
    Dim extlinks
    Dim j As Long
    extlinks = ThisWorkbook.LinkSources(xlExcelLinks)
    If Not IsEmpty(extlinks) Then
        For j = LBound(extlinks) To UBound(extlinks)
            MsgBox extlinks(j)
        Next
    End If

End Sub


Import data from SQL

Macro to import data from SQL using ADO connection string: Sub Import_data_from_SQL() ' Tools -> References -> Microsoft Active...