![]() |
|
|||||||
|
|
Thread Tools
|
Display Modes
|
|
|
|
#1
|
|||
|
|||
|
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
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
How to SUM the values only if the particular cells are not empty?
|
Learner7 | Excel | 3 | 11-10-2020 02:47 AM |
| auto progress number evenly between two values across empty cells ? | DBenz | Excel | 4 | 03-28-2018 04:46 AM |
| If a2 is not empty, color empty cells in b2:af2 | turkanet | Excel | 2 | 08-20-2017 11:00 PM |
Microsoft Excel 12.0 Object Library reference upload
|
chamdan | Project | 2 | 04-21-2014 06:30 AM |
| Apparently empty (blank) cells aren't empty | daymaker | Excel | 3 | 03-08-2012 03:41 PM |