Faça assim
'adicione um Check
Private Sub Check1_Click()
If Check1.Value = vbChecked Then
Dim i As Long
If lvwBackColour.ListItems.Count > 0 Then
picBG.Width = lvwBackColour.Width
picBG.Height = lvwBackColour.ListItems(1).Height * (lvwBackColour.ListItems.Count)
picBG.ScaleHeight = lvwBackColour.ListItems.Count
picBG.ScaleWidth = 1
picBG.DrawWidth = 1
picBG.Cls
For i = 1 To lvwBackColour.ListItems.Count
If (lvwBackColour.ListItems(i).Index Mod 2) = 0 Then
lvwBackColour.ListItems(i).Checked = True
picBG.Line (0, i - 1)-(1, i), &H4000FF, BF
lvwBackColour.ListItems(i).SubItems(3) = "Hidden column value = 1"
Else
lvwBackColour.ListItems(i).Checked = False
picBG.Line (0, i - 1)-(1, i), &HFFFFFF, BF
lvwBackColour.ListItems(i).SubItems(3) = "Hidden column value = 0"
End If
Next i
lvwBackColour.Picture = picBG.Image
Else
picBG.Cls
lvwBackColour.Picture = picBG.Image
For i = 1 To lvwBackColour.ListItems.Count
lvwBackColour.ListItems(i).SubItems(3) = "Hidden column value = 0"
Next i
End If
Check1.Caption = "Remove colouring and empty checkboxes"
Else
Check1.Caption = "Make every other row coloured."
picBG.Cls
lvwBackColour.Picture = picBG.Image
For i = 1 To lvwBackColour.ListItems.Count
lvwBackColour.ListItems(i).Checked = False
lvwBackColour.ListItems(i).SubItems(4) = 0
lvwBackColour.ListItems(i).SubItems(3) = "Hidden column value = 0"
Next i
End If
End Sub
'na propriedade do seu LstV
Private Sub lvwBackColour_ItemCheck(ByVal Item As MSComctlLib.ListItem)
Dim i As Long
If Item.Checked = True Then
lvwBackColour.ListItems(Item.Index).SubItems(4) = 1
Else
lvwBackColour.ListItems(Item.Index).SubItems(4) = 0
End If
If lvwBackColour.ListItems.Count > 0 Then
picBG.Width = lvwBackColour.Width
picBG.Height = lvwBackColour.ListItems(1).Height * (lvwBackColour.ListItems.Count)
picBG.ScaleHeight = lvwBackColour.ListItems.Count
picBG.ScaleWidth = 1
picBG.DrawWidth = 1
picBG.Cls
For i = 1 To lvwBackColour.ListItems.Count
If lvwBackColour.ListItems(i).SubItems(4) = 1 Then
lvwBackColour.ListItems(i).Checked = True
picBG.Line (0, i - 1)-(1, i), &H80FFFF, BF
lvwBackColour.ListItems(i).SubItems(3) = "Hidden column value = 1"
Else
lvwBackColour.ListItems(i).Checked = False
picBG.Line (0, i - 1)-(1, i), &HFFFFFF, BF
lvwBackColour.ListItems(i).SubItems(3) = "Hidden column value = 0"
End If
Next i
lvwBackColour.Picture = picBG.Image
Else
picBG.Cls
lvwBackColour.Picture = picBG.Image
End If
End Sub
' NÃO QUIZER USAR O Check, use apenas o salto de linha "Rows"