anthonyenglish
New Member
- Joined
- Jan 17, 2005
- Messages
- 19
I have a list box with 4 columns. I would like to have one of the columns to contain a check box as the value it relates to is either true or false. Can a list box contain a check box and if so, how. Any answers before I pull anymore hair out?
My code is below
Private Sub UserForm_Initialize()
Dim intCounter As Integer
Dim intLastRow As Integer
intLastRow = Cells(1, 1).End(xlDown).Row
For intCounter = 4 To intLastRow
frmDates.lstData.ColumnCount = 4
frmDates.lstData.AddItem Cells(intCounter, 2).Value
frmDates.lstData.List(intCounter - 4, 1) = Cells(intCounter, 1).Value
frmDates.lstData.List(intCounter - 4, 2) = Cells(intCounter, 2).Value
frmDates.lstData.List(intCounter - 4, 3) = Cells(intCounter, 20).Value
frmDates.lstData.TextColumn = 4
Next intCounter
frmDates.Show
End Sub
My code is below
Private Sub UserForm_Initialize()
Dim intCounter As Integer
Dim intLastRow As Integer
intLastRow = Cells(1, 1).End(xlDown).Row
For intCounter = 4 To intLastRow
frmDates.lstData.ColumnCount = 4
frmDates.lstData.AddItem Cells(intCounter, 2).Value
frmDates.lstData.List(intCounter - 4, 1) = Cells(intCounter, 1).Value
frmDates.lstData.List(intCounter - 4, 2) = Cells(intCounter, 2).Value
frmDates.lstData.List(intCounter - 4, 3) = Cells(intCounter, 20).Value
frmDates.lstData.TextColumn = 4
Next intCounter
frmDates.Show
End Sub