Results 1 to 7 of 7

Transpose a table's first row into an array

Threaded View

  1. #1
    Forum Contributor jimmalk's Avatar
    Join Date
    08-31-2012
    Location
    Chicago
    MS-Off Ver
    Excel 2010
    Posts
    113

    Transpose a table's first row into an array

    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!!
    Last edited by jimmalk; 11-23-2012 at 01:50 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1