If you want to get the table name from a cell you can use:
Sub TableHeaders()
Dim TableName As String
TableName = ThisWorkbook.Worksheets("Data").Range("A1")
Dim lo As ListObject
Set lo = ThisWorkbook.Worksheets("Data").ListObjects(TableName)
ThisWorkbook.Names.Add Name:="LabelName", RefersTo:=lo.HeaderRowRange
ThisWorkbook.Names("LabelName").Comment = "References " & lo.HeaderRowRange.Address
End Sub
Using formula only you could use: =INDIRECT($A$1 & "[#Headers]")
You could create a validation list in cell A1 to list all the tables:
Sub CreateValidationList()
Dim lo As ListObject
Dim ValidationList As String
With ThisWorkbook.Worksheets("Data")
For Each lo In .ListObjects
ValidationList = ValidationList & lo.Name & ","
Next lo
ValidationList = Left(ValidationList, Len(ValidationList) - 1)
With .Range("A1").Validation
.Delete
.Add Type:=xlValidateList, _
AlertStyle:=xlValidAlertStop, _
Formula1:=ValidationList
.IgnoreBlank = True
.InCellDropdown = True
End With
End With
End Sub
Not sure why you'd want to select the table though - you can reference it without selecting it.
How to avoid using Select in Excel VBA