Hello
Any ideas How can i upload values of
ONLY Non-Empty Cells Reference of a Table in ComboBox. Bit Confused in getting the right syntax.
The below code gives all the Cell References in the table. Empty and Non-Empty
Code:
Public Sub NonEmptyCellRef()
Dim oTbl As Table
Dim NonEmptyCellListStr As String, NonEmptyCellsList As Variant
Dim wdActDoc As Document
Set wdActDoc = ActiveDocument
Set oTbl = wdActDoc.Tables(1)
With oTbl.Range
For i = 1 To .Cells.Count
With .Cells(i)
NonEmptyCellListStr = NonEmptyCellListStr & .RowIndex & ", " & .ColumnIndex & "^"
NonEmptyCellsList = Split((Replace(NonEmptyCellListStr, Chr(147), "")), "^")
End With
Next
ComboBox1.List = NonEmptyCellsList
End With
End Sub
SamD