Sub TestListNames()
ListWorkbookNames ThisWorkbook, ThisWorkbook.Worksheets(2).range("a2")
End Sub
Sub ListWorkbookNames(wb As Workbook, rgListStart As range)
Dim nm As name
For Each nm In wb.Names
rgListStart.value = nm.name
rgListStart.Offset(0, 1).value = "'" & nm.RefersTo
Set rgListStart = rgListStart.Offset(1, 0)
Next
End Sub
|