Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 16005

List box

$
0
0
Hello, i have problem , when ever i try to add info from cells to list box it also adds empty spaces, how could i change this?
Here is my code


Code:

Private Sub CommandButton1_Click()
    ListBox1.Clear


    If TypeOf Selection Is Range Then
        For i = 1 To Selection.Rows.Count
            For j = 1 To Selection.Columns.Count


                ListBox1.AddItem (Selection.Cells(i, j))


            Next
        Next
    End If

End Sub


Viewing all articles
Browse latest Browse all 16005

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>