Macro Sheets Only
Returns, as a horizontal array of text values, the names of all workbooks referred to by external references in the workbook specified. Use LINKS with OPEN.LINKS to open supporting workbooks.
Syntax
LINKS(document_text, type_num)
Document_text is the name of a workbook, including its path. If document_text is omitted, LINKS operates on the active workbook. If the workbook specified by document_text is not open, LINKS returns the #N/A error value.
Type_num is a number from 1 to 6 specifying the type of linked workbooks to return.
Type_num Returns
1 or omitted Microsoft Excel link
2 DDE/OLE link (Microsoft Excel for Windows)
3 Reserved
4 Not applicable
5 Publisher (Microsoft Excel for the Macintosh)
6 Subscriber (Microsoft Excel for the Macintosh)
Remarks
Examples
If a chart named Chart1 is open and contains links to workbook Data1 and Data2, and the LINKS function shown below is entered as an array into a two-cell horizontal range:
LINKS("Chart1") equals "Data1" in the first cell of the range and "Data2" in the second cell.
In Microsoft Excel for Windows, if the chart named VARIANCE.XLS is open and contains data series that refer to workbook named BUDGET.XLS and ACTUAL.XLS, then:
OPEN.LINKS(LINKS("VARIANCE.XLS")) opens BUDGET.XLS and ACTUAL.XLS.
In Microsoft Excel for the Macintosh, if the workbook named SALES 1991 is open and contains references to the workbook WEST SALES, SOUTH SALES, and EAST SALES, then:
OPEN.LINKS(LINKS("SALES 1991")) opens WEST SALES, SOUTH SALES, and EAST SALES.
Related Functions
CHANGE.LINK Changes supporting workbook links
GET.LINK.INFO Returns information about a link
OPEN.LINKS Opens specified supporting workbook
UPDATE.LINK Updates a link to another workbook
List of Information Functions