Pour l'instant,
mon code se limite à ces 2 instructions que j'ai laissées dans le même module pour les tester + facilement
ActiveWorkbook.SaveCopyAs ("C:\chemin du fichier et nom .xls X "). Workbooks.Open "C:\Documents and settings\Benchétrit Christian\Bureau\Base de données\Ecti\Gestion des mission .xlsx", 3
En amont se trouve un programme de pilotage d'un logiciel sur intranet qui me donne les éléments d'un tableau qui va sur feuil3. En voilà la partie "Edition":
Sheets("Feuil3").Activate
Cells(2, 1).Select
J = 2
v = 1
Blog = 0
Plug:
UU = "A1": Call FORMATAGE(UU, 1)
'UserForm5.Hide
If NombreExperts > 30 Then ImprimNombreExpert = 30 Else ImprimNombreExperts = NombreExperts
For I = 1 To ImprimNombreExperts
If J > 99 Then L = 3 Else L = 2
If I = (6 * v) + 1 Then Stop: v = v + 1: J = J + 1: UU = "A" + Right(str(J), L): Call FORMATAGE(UU, J): J = J + 1
For K = 1 To 7
col = col + 1: Loc = Loc + 1
If Profil(I, 1) = "" Then Exit For
If J >= 28 Then Blog = 2
'1
If J = 2 + ((I - 1) * 4) + (Blog * (v - 1)) And col = 3 Then Loc = Loc + 1
'2
If J = 2 + ((I - 1) * 4) + (Blog * (v - 1)) And col = 4 Then J = J + 1: Loc = 2: Cells(J + 1, Loc).Select
'3
If J = 3 + ((I - 1) * 4) + (Blog * (v - 1)) And col = 6 Then J = J + 1: Loc = 2: Cells(J + 1, Loc).Select
'4
If J = 4 + ((I - 1) * 4) + (Blog * (v - 1)) And col = 7 Then J = J + 1: Loc = 2: Cells(J + 1, Loc).Select
Cells(J, Loc) = Profil(I, col)
If J = 7 + ((I - 1) * 4) + (Blog * (v - 1)) And col = 2 Then Loc = Loc + 1
Next
col = 0: J = J + 1: Loc = 0: Cells(J, 1).Select
Next
Cells(1, 1).Select
Unload UserForm2
Call fORMATURE
If nombreexpert < 7 Then Cells(26, 3).Value = "Nombre d'experts :": Cells(26, 4).Value = NombreExperts
If nombreexpert > 6 And NombreExperts < 13 Then Cells(52, 3).Value = "Nombre d'experts :": Cells(52, 4).Value = NombreExperts
If nombreexpert > 12 And NombreExperts < 20 Then Cells(78, 3).Value = "Nombre d'experts :": Cells(78, 4).Value = NombreExperts
If nombreexpert > 18 And NombreExperts < 27 Then Cells(104, 3).Value = "Nombre d'experts :": Cells(104, 4).Value = NombreExperts
If nombreexpert > 24 And NombreExperts < 34 Then Cells(130, 3).Value = "Nombre d'experts :": Cells(130, 4).Value = NombreExperts
Sheets("Feuil3").Activate
ActiveWorkbook.SaveCopyAs ("C:\Documents and settings\Benchétrit Christian\Bureau\Base de données\Ecti\Gestion des mission .xls")
' Effacement des contenus de feuil3
Workbooks.Open "C:\Documents and settings\Benchétrit Christian\Bureau\Base de données\Ecti\Gestion des mission .xls", 3
Stop
Merci