Fichier Excel exécutable exe
Bonjour à tous,
J'ai un fichier Excel mais je l'ai déjà transféré en fichier exécutable (fichier type)
J'ai un autre fichier A en excel qui ont 4 onglets à copier sur le fichier type exécutable
Le macro en bas fonctionnait bien si les deux fichiers en excel
mais il ne fonctionne plus quand le deuxième en exécutable
Sub exporter()
Application.ScreenUpdating = False
Dim Ayi(70), Ays(70), Axi(70), Axs(70) As Long
Dim i As Long
Dim MyFile As String
MyFile = Application.GetOpenFilename()
Workbooks.Open (MyFile)
Worksheets("RENFORT").Activate
Worksheets("Rinf").Activate
For i = 1 To 70
Ayi(i) = Cells(14 + i, 13)
Next i
Worksheets("Rsup").Activate
For i = 1 To 70
Ays(i) = Cells(14 + i, 13)
Next i
Worksheets("Tinf").Activate
For i = 1 To 70
Axi(i) = Cells(14 + i, 13)
Next i
Worksheets("Tsup").Activate
For i = 1 To 70
Axs(i) = Cells(14 + i, 13)
Next i
Application.Windows(1).Close SaveChanges:=False
Workbooks(1).Activate
Worksheets("Rinf").Activate
For i = 1 To 70
Cells(28 + i, 11) = Ayi(i)
Next i
Worksheets("Rsup").Activate
For i = 1 To 70
Cells(28 + i, 11) = Ays(i)
Next i
Worksheets("Tinf").Activate
For i = 1 To 70
Cells(28 + i, 11) = Axi(i)
Next i
Worksheets("Tsup").Activate
For i = 1 To 70
Cells(28 + i, 11) = Axs(i)
Next i
je crois que c'est le problem de reconnaitre le 2ème écran (2ème windows) comme un onglet active.
Avez-vous une idée pour corriger ça?
Merci d'avance