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
| Sub recap()
'--------------------Rempli la feuille Recap (Credit, Carte, Espece)------------------
'---------------------------------Note les consommations-------------------------------------------
Application.ScreenUpdating = False
Worksheets("Recap").Activate 'selectionne la feuille Recap
Range("A65536").End(xlUp).Offset(1, 0).Select
ancienneDette = CaisseEnregistreuse.Lab_Dette.Caption
ActiveCell.Value = CDate(Date)
ActiveCell.Offset(0, 1).Value = Time
ActiveCell.Offset(0, 2) = CaisseEnregistreuse.Lab_Serveur
ActiveCell.Offset(0, 3) = CaisseEnregistreuse.Lab_Client
If ancienneDette = "" Then
Else
ActiveCell.Offset(0, 4) = CDec(ancienneDette)
End If
ActiveCell.Offset(0, 5) = CaisseEnregistreuse.Lab_Reglement.Caption
ActiveCell.Offset(0, 6) = CDec(CaisseEnregistreuse.Lab_Total)
ActiveCell.Offset(0, 7).FormulaR1C1 = "=Ticket!R13C1 &"" - ""&Ticket!R13C2"
ActiveCell.Offset(0, 8).FormulaR1C1 = "=Ticket!R14C1 &"" - ""&Ticket!R14C2"
ActiveCell.Offset(0, 9).FormulaR1C1 = "=Ticket!R15C1 &"" - ""&Ticket!R15C2"
ActiveCell.Offset(0, 10).FormulaR1C1 = "=Ticket!R16C1 &"" - ""&Ticket!R16C2"
ActiveCell.Offset(0, 11).FormulaR1C1 = "=Ticket!R17C1 &"" - ""&Ticket!R17C2"
ActiveCell.Offset(0, 12).FormulaR1C1 = "=Ticket!R18C1 &"" - ""&Ticket!R18C2"
ActiveCell.Offset(0, 13).FormulaR1C1 = "=Ticket!R19C1 &"" - ""&Ticket!R19C2"
ActiveCell.Offset(0, 14).FormulaR1C1 = "=Ticket!R20C1 &"" - ""&Ticket!R20C2"
ActiveCell.Offset(0, 15).FormulaR1C1 = "=Ticket!R21C1 &"" - ""&Ticket!R21C2"
ActiveCell.Offset(0, 16).FormulaR1C1 = "=Ticket!R22C1 &"" - ""&Ticket!R22C2"
ActiveCell.Offset(0, 17).FormulaR1C1 = "=Ticket!R23C1 &"" - ""&Ticket!R23C2"
ActiveCell.Offset(0, 18).FormulaR1C1 = "=Ticket!R24C1 &"" - ""&Ticket!R24C2"
ActiveCell.Offset(0, 19).FormulaR1C1 = "=Ticket!R25C1 &"" - ""&Ticket!R25C2"
ActiveCell.Range(Cells(, 7), Cells(, 19)).Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWorkbook.Save
Application.ScreenUpdating = True
End Sub |
Partager