1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| Private Sub ListViewRecouvre_Click()
Dim i As Integer, ListCount As Integer
ListeCount = ListViewRecouvre.ListItems.Count
For i = 1 To ListeCount
If ListViewRecouvre.ListItems.Item(i).Selected Then
rep = MsgBox("Voulez-vous enregistrer cette facture ?", vbOKCancel + vbQuestion, "ENREGISTRER")
If rep = vbCancel Then Exit Sub
With UserFormMiseajrRegle
'Couleur des textbox et alignement texte
'------------Mise en Forme Police--------------------
.TextBoxNclient.TextAlign = fmTextAlignCenter
.TextBoxNclient.ForeColor = &HFFFFFF
.TextBoxNclient.Font.Bold = True
'------------TextBox BackColor----------------------
.TextBoxNclient.BackColor = &HFF&
.TextBoxNfacture.BackColor = &HC0C0C0
.TextBoxMontTtc.BackColor = &HC0C0C0
.TextBoxSolde.BackColor = &HC0C0C0
'---------Contenu des textbox------------------------
.TextBoxSolde = CCur(ListViewRecouvre.ListItems(i).ListSubItems(12))
.TextBoxMontTtc = ListViewRecouvre.ListItems(i).ListSubItems(10)
.TextBoxNclient = ListViewRecouvre.ListItems(i).ListSubItems(2)
.TextBoxNfacture = ListViewRecouvre.ListItems(i).ListSubItems(1)
'---------N° de ligne Facture------------------------
FacLgn = Feuil1.Range("B:B").Find(.TextBoxNfacture, LookIn:=xlValues, lookat:=xlWhole).Row
End With
UserFormMiseajrRegle.Show
Exit For
End If
Next i
End Sub |
Partager