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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| Option Explicit
Public lab4, lab5, lab6, t, text1, text2 As String
Public fm4, fm5, fm6, nb4, nb5, nb6 As Byte
Public mctrl4, mctrl5, mctrl6 As Object
Dim ctrlid4, ctrlid5, ctrlid6, dl, nbl As Integer
Sub Dern_lign()
Sheets("List of reports").Activate
dl = 3
Cherch_dl:
t = Cells(dl, 13)
If t = "" Then
dl = dl - 1
Load UserForm1
UserForm1.Show
Exit Sub
Else
dl = dl + 1
GoTo Cherch_dl
End If
End Sub
Sub Copy_lign()
Range(Cells(dl, 1), Cells(dl, 18)).Select
Selection.Copy
dl = dl + 1
nbl = nbl + 1
Range(Cells(dl, 1), Cells(dl, 1)).Select
ActiveSheet.Paste
Cells(dl, 12) = lab5
Cells(dl, 13) = lab6
Cells(dl, 14) = lab4
Cells(dl, 1) = text1
Cells(dl, 2) = text2
End Sub
Sub Fin_trait()
Unload UserForm1
MsgBox "Traitement terminé, " & nbl & " ligne(s) ajoutée(s).", _
vbOKOnly + vbInformation + vbApplicationModal, "Information"
End Sub |
Partager