Bonjour,
J'ai code qui fonctionne trés bien mais j'aimerai lui apporté une modification.
J'ai une liste de nom en colonne "A" et lorsque je clique sur mon bouton j'ai mon code qui affiche en colonne "D" la transformation
et j'aimerai que les noms qui sont composé ont un Underscore.
Mon code:
Sub MYmacro()
lg = 6
[D6:D65000].ClearContents
For lig = 6 To [A65000].End(3).Row
tx = Cells(lig, 1)
ville = Replace(tx, " (*)", "")
ville = Split(ville, " - ")(1)
cp = Left(tx, 8)
dep = Left(cp, 2)
fx = Replace("<td class=@td_text@> " & ville & " <br>- " & cp & "</td>", "@", """")
Cells(lg, 4) = fx
fx = "<td class=@td_image@><a href=@" & ville & ".html@><img src=@../Blason_france/blason_alpha/" & ville & "-" & dep & ".jpg@ width=@95@ height=@120@ ></a></td>"
fx = Replace(fx, "@", """")
Cells(lg + 6, 4) = fx
lg = lg + 1: i = i + 1
If i = 5 Then
k = k + 1: Cells(lg, 4) = "--->>> " & k
lg = lg + 7: i = 0
End If
Next
End Sub
Je joint mon fichier qui seras plus explicite.
Je vous remercie d'avance
Max