Hi:
Is it possible to have a listview with checkboxes? I know it is in regular VB6, but what about VBA?
Using Excel 2003.
Here's what I have...(same as previous post)
Thanks,
Ron Repp
If gray hair is a sign of wisdom, then I'm a genius.
My newest novel: Wooden Warriors
Is it possible to have a listview with checkboxes? I know it is in regular VB6, but what about VBA?
Using Excel 2003.
Here's what I have...(same as previous post)
Code:
Private Sub TV1_Click()
Select Case TV1.SelectedItem.Key
Case "TABLE"
LV1.ListItems.Clear
LV1.ColumnHeaders.Clear
Exit Sub
Case "Root"
LV1.ListItems.Clear
LV1.ColumnHeaders.Clear
Exit Sub
Case "VIEW"
LV1.ListItems.Clear
LV1.ColumnHeaders.Clear
Exit Sub
Case Else
LV1.ColumnHeaders.Clear
LV1.ColumnHeaders.Add , , "Field"
Dim Con As ADODB.Connection
Dim FieldsRS As ADODB.Recordset
Dim S As String
Dim Pos As Integer
Dim LI As ListItem
LV1.View = lvwReport
Set Con = New ADODB.Connection
Con.ConnectionString = sCon
Con.Open sCon
Set FieldsRS = Con.OpenSchema(adSchemaColumns)
LV1.ListItems.Clear
While Not FieldsRS.EOF
If FieldsRS.Fields(2) = TV1.SelectedItem.Text Then
LV1.ListItems.Add , , FieldsRS(3)
Debug.Print "First"
Debug.Print FieldsRS(7)
Debug.Print "2nd"
Debug.Print FieldsRS(6)
End If
FieldsRS.MoveNext
Wend
Set FieldsRS = Nothing
End Select
Con.Close
Set Con = Nothing
End Sub
Thanks,
Ron Repp
If gray hair is a sign of wisdom, then I'm a genius.
My newest novel: Wooden Warriors