Good evening. A simple "difficult" question. I wish to transpose the header row of a table into an array.
Private Sub UserForm_Initialize()
Dim RefTabHeader() As String
Dim oList As ListObject
On Error Resume Next
Set oList = ActiveCell.ListObject
On Error GoTo 0
RefTabHeader = oList.Range.Rows(1).Value '// neither of these 2 ideas worked
RefTabHeader = Application.Transpose(oList.Range.Rows(1).Value) '//
End Sub
The ActiveCell is on a table that's on the worksheet. This code is for the initialization of a form I open. Please help!!
Bookmarks