Hi, so this is my code which now pulls the info only from the every second column but when it populates the Listbox then it also skips every second column. Can someone please assist as I am battling to figure it out.
Sub Cloud()
Dim oFrm As Cloud
Set oFrm = New Cloud
If ActiveDocument.Tables(3).Rows.Count > 2 And Not ActiveDocument.Tables(3).Rows(2).Cells(1).Range.Text = Chr(13) & Chr(7) Then
With oFrm.ListBox1
.List = FillArray
.ColumnCount = 5
End With
End If
oFrm.Show
Unload oFrm
Set oFrm = Nothing
lbl_Exit:
Exit Sub
End Sub
Public Function FillArray()Dim myArray() As String
Dim i As Long
Dim j As Long
Dim pRow As Long
Dim pColumns As Long
Dim oTbl As Word.Table
Set oTbl = ActiveDocument.Tables(3)
ReDim myArray(oTbl.Rows.Count - 3, oTbl.Columns.Count - 2)
For i = 0 To UBound(myArray, 1)
For j = 0 To UBound(myArray, 2)
myArray(i, j) = Left(oTbl.Cell(i + 2, j + 1), Len(oTbl.Cell(i + 2, j + 1).Range.Text) - 2)
j = j + 1
'MsgBox j
Next
Next
FillArray = myArray
End Function