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
|
Dim therow As Integer
therow = Tools.FindFirstEmptyCell(ActiveSheet.name, ACT_START_ROW, 1)
ActiveSheet.Unprotect Password:=SH_PWD
ActiveSheet.Cells(therow, COL_USR_PROJET).value = projet
ActiveSheet.Cells(therow, COL_USR_CATEGORIE).value = categorie
ActiveSheet.Cells(therow, COL_USR_ACTIVITE).value = activite
ActiveSheet.Cells(therow, COL_USR_DATE).value = thedate
ActiveSheet.Cells(therow, COL_USR_NUMWEEK).value = numWeek
ActiveSheet.Cells(therow, COL_USR_QUANTITE).value = qte
ActiveSheet.Cells(therow, COL_USR_COUNTER).value = num
ActiveSheet.Protect Password:=SH_PWD
' Copie dans la feuille de consolidation
Dim consoSheet As Worksheet
Set consoSheet = ActiveWorkbook.Sheets(SH_CONSOMENS)
therow = Tools.FindFirstEmptyCell(SH_CONSOMENS, CONSO_START_ROW, 1)
consoSheet.Unprotect Password:=SH_PWD
consoSheet.Cells(therow, COL_CONSO_PROJET).value = projet
consoSheet.Cells(therow, COL_CONSO_CATEGORIE).value = categorie
consoSheet.Cells(therow, COL_CONSO_ACTIVITE).value = activite
consoSheet.Cells(therow, COL_CONSO_RESSOURCE).value = currentUser
consoSheet.Cells(therow, COL_CONSO_NUMWEEK).value = numWeek
consoSheet.Cells(therow, COL_CONSO_MONTH).value = Month(currentDate)
consoSheet.Cells(therow, COL_CONSO_QUANTITE).value = qte
consoSheet.Cells(therow, COL_CONSO_COUNTER).value = num
consoSheet.Protect Password:=SH_PWD |
Partager