Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

récupération de données d'un tableau à un autre tableau onglet par onglet

1 réponse
Avatar
JP
Un tableau A à trois onglets de donnée et un tableau B à trois onglets de
récupération de ces données
journalière.
Je bloque à la récupération des données du deuxième onglet de A vers le
deuxième onglet B

1 réponse

Avatar
JP
voici ma démarche

L'erreur est sur Sheets("Contrôle 2").Select
Erreur exécution '9'
l'indice n'appartient pas à la sélection

Application.ScreenUpdating = False

Sheets("Fouille Matin N°1").Select

D = Left(ActiveCell, 2)
M = Mid(ActiveCell, 4, 2)
Y = Right(ActiveCell, 2)
LeJourTraité = ActiveCell.Address
LaLigneDate = ActiveCell.Row
LaLigneDate = LaLigneDate + ((LaLigneDate / 2) - 1.5)

Set Travail = Application.FileSearch
With Travail
.LookIn = "F:DXRG2DXRG2-Qualité SûretéIFPBCFiches"
.Filename = "A" & D & M & Y & " Matin " & ".xls"
If .Execute > 0 Then
ActiveCell.Interior.ColorIndex = xlNone
Workbooks.Open Filename:= _
"F:DXRG2DXRG2-Qualité SûretéIFPBCFichesA" & D & M & Y &
" Matin " & ".xls"
Else
If Now < ActiveCell Then
MsgBox "cette fiche n'existe pas encore !", , "IFPBC A
Matin"
ActiveCell.Interior.ColorIndex = 4
GoTo termb
Else
MsgBox "cette fiche n'existe pas ", , "IFPBC A Matin"
ActiveCell.Interior.ColorIndex = 4
GoTo termb
End If
End If
End With

Sheets("Contrôle 1").Select
For I = 7 To 31
Windows("IFPBC taux de fouille 2AB " & M & Y &
".xls").ActiveCell.Offset(0, K) = _
Sheets("Contrôle 1").Cells(22, I)
Windows("IFPBC taux de fouille 2AB " & M & Y &
".xls").ActiveCell.Offset(1, K) = _
Sheets("Contrôle 1").Cells(23, I)
K = K + 2
Next I

Windows("IFPBC taux de fouille 2AB " & M & Y & ".xls").Activate
Sheets("Fouille Matin N°2").Activate
Sheets("Contrôle 2").Select
For I = 7 To 31
Windows("IFPBC taux de fouille 2AB " & M & Y &
".xls").ActiveCell.Offset(0, K) = _
Sheets("Contrôle 2").Cells(22, I)
Windows("IFPBC taux de fouille 2AB " & M & Y &
".xls").ActiveCell.Offset(1, K) = _
Sheets("Contrôle 2").Cells(23, I)
K = K + 2
Next I


"JP" a écrit dans le message de news:
436e59cf$0$978$
Un tableau A à trois onglets de donnée et un tableau B à trois onglets de
récupération de ces données
journalière.
Je bloque à la récupération des données du deuxième onglet de A vers le
deuxième onglet B