View Single Post
 
Old 03-07-2021, 11:59 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,105
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Assuming this relates to userform code:

Code:
Private Sub UserForm_Initialize()
    NonEmptyCellRef
End Sub

Private Sub NonEmptyCellRef()
Dim oTbl As Table
Dim i As Integer
    Set oTbl = ActiveDocument.Tables(1)
    With oTbl.Range
        For i = 1 To .Cells.Count
            If Len(.Cells(i).Range) > 2 Then
                ComboBox1.AddItem .Cells(i).RowIndex & ", " & .Cells(i).ColumnIndex & "^"
            End If
        Next i
    End With
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote