G
Guest
I have a column where some data is dumped. Sometimes there is a blank cell in
a column. I want to add the values to the listbox from only those cells where
there is a data. If there is no data i need to skip the cell.
I am using the following code...which works fine if there are no blanks in
between or start ....but it doesn't work fine for where there are blank in
between or start
Suggestions will be highly appreciated.
Set TestSheet = ThisWorkbook.Sheets("Test")
TopicCount = Application.WorksheetFunction.CountA(TestSheet.Range("3:3"))
For Col = 2 To TopicCount + 1
lstbox1.AddItem TestSheet.Cells(3, Col)
Next Col
lstbox1.ListIndex = 0
a column. I want to add the values to the listbox from only those cells where
there is a data. If there is no data i need to skip the cell.
I am using the following code...which works fine if there are no blanks in
between or start ....but it doesn't work fine for where there are blank in
between or start
Suggestions will be highly appreciated.
Set TestSheet = ThisWorkbook.Sheets("Test")
TopicCount = Application.WorksheetFunction.CountA(TestSheet.Range("3:3"))
For Col = 2 To TopicCount + 1
lstbox1.AddItem TestSheet.Cells(3, Col)
Next Col
lstbox1.ListIndex = 0