Bonjour,


J'ai une macro qui opère des conversions suite à des données copiées/collées :
Avant conversion:
Nom : Avant conversion.jpg
Affichages : 150
Taille : 53,5 Ko

Après conversion:
Nom : Après conversion.jpg
Affichages : 124
Taille : 38,6 Ko

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
 
Sub TestAppli2()
 
i = 2
While Cells(i, 1) <> "": i = i + 1: Wend
 
For l = 2 To i - 1
Cells(l, 3) = convertdat(Cells(l, 3))
Cells(l, 6) = convertdat(Cells(l, 6))
Cells(l, 7) = convertdat(Cells(l, 7))
Next
Columns("F:F").Insert Shift:=xlToRight
Cells(1, 6) = "Semaine"
For l = 2 To i - 1
Cells(l, 6) = DatePart("ww", Cells(l, 7), vbMonday, vbFirstFourDays)
Cells(l, 6).NumberFormat = "general"
Next
For l = 2 To i - 1
Cells(l, 4).NumberFormat = "@"
Next
 
Range(Worksheets("Données_p_conversion").Range("M1"), Worksheets("Données_p_conversion").Range("M1").End(xlDown)).Clear
Range(Worksheets("Données_p_conversion").Range("N1"), Worksheets("Données_p_conversion").Range("N1").End(xlDown)).Clear
Range(Worksheets("Données_p_conversion").Range("O1"), Worksheets("Données_p_conversion").Range("O1").End(xlDown)).Clear
Range(Worksheets("Données_p_conversion").Range("P1"), Worksheets("Données_p_conversion").Range("P1").End(xlDown)).Clear
 
 
End Sub
 
---------------------------------------
Function convertdat(dat)
    convertdat = DateSerial(Left(dat, 4), Mid(dat, 5, 2), Right(dat, 2))
End Function


Le but est de pouvoir importer les données converties avec access, seulement j'ai une erreur F13 car access considère une 13ème colonne à cause du bouton, je cherche donc à mettre mon bouton sur un onglet "Accueil" mais je ne trouve pas comment modifier ma macro pour que tout s'opère sur mon onglet "Données_p_conversion"


Merci par avance,