I have a dialog box with a combobox in it that I use for data entry.
I am populating the combobox with range P10:P131, which is quite a number of options. This range includes quite a few empty cells, as well as quite a few hidden rows.
Can you help me write an IF statement in this macro that will eliminate the cells in the hidden rows from the combo box, as well as the empty cells?
What I have adds ALL the cells in the range, including the empty cells and the cells in the hidden rows.
listbox = oDialog1.getControl("ComboBox1")
With ThisComponent.CurrentController.ActiveSheet
For Each cell in .getCellRangeByName("P10:P131").DataArray
listbox.addItems (cell, 1)
Next cell
End with