Bonjour,
Ci-dessous ma macro qui me sort un fichier csv avec séparateur point-virgule ";"
J'aimerais que dans la dernière colonne de ma plage, la macro ne mette pas de séparateur ";"
Pourriez-vous m'aider?
Merci par avance.
Sub ma macro ()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim Plage As Variant, oL As Variant, oC As Variant, Tmp As String, Sep$
Dim monfichier As Worksheets
Dim Paramétrage_fournisseur As Worksheets
Sep = ";"
Application.ScreenUpdating = False
Worksheets("mafeuille").Activate
DerLig = ActiveSheet.Range("B" & Rows.Count).End(xlUp).Row
Set Plage = ActiveSheet.Range("B8:AD" & DerLig)
Open "monchemin\monfichier.csv" For Output As #1
For Each oL In Plage.Rows
Tmp = ""
If oL.Cells(1, 1).Value <> "" Then cells(1,1)
For Each oC In oL.Cells
Tmp = Tmp & CStr(oC.Text) & Sep
Next
Print #1, Tmp
End If
Next
Close
Worksheets("Paramétrage_fournisseur").Activate
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic