Loading a Column of Excel into a CheckedListBox
I got this far opening the excel sheet:
VB Code:
Dim excelsheet As New Application
Dim filepath As String
filepath = TextBox1.Text
excelsheet.Workbooks.Open(filepath)
Dim xlWsheet As Worksheet = excelsheet.Worksheets("Sheet1")
Dim r As Range = xlWsheet.UsedRange
MsgBox(r.Cells(1, 1).Value)
I get the first row displayed on the MessageBox, however that was for testing only. How would I go about placing all values in that column into a checked List Box? I am using VS 2005
Re: Loading a Column of Excel into a CheckedListBox
Just do a cicle increasing the line number until you find an empty cell.
Jorge