So guys I'm using this code to find if there is any items in a listview
between the times of 09:00 and 09:30Code:Dim i As Long, ItemFound As Boolean For i = 1 To Form9.ListView1.ListItems.Count If Form9.ListView1.ListItems(i).SubItems(2) = Format$(Now, "dd/mm/yyyy") And Form9.ListView1.ListItems(i).SubItems(3) >= "09:00" And Form9.ListView1.ListItems(i).SubItems(3) <= "09:29" Then Form9.ListView1.ListItems(i).Selected = True ItemFound = True Exit For Else ItemFound = False End If Next i If ItemFound = True Then Combo1.Visible = True Combo1.Text = Form9.ListView1.SelectedItem Combo1.AddItem (Form9.ListView1.SelectedItem)
if so, I want it to add them to combo1.text
for some reason at the moment the if item found code does not work as combo1 does not become visible,
Any ideas why?
Thanks,
Jamie




Reply With Quote