Re: Remplacement dans un lien HyperText
Bonjour michel, bonjour le forum,
Merci de ta réponse, je pense que je suis sur la bonne voie mais je n'arrive pas à faire fonctionner ta macro
(J'utilise XL 97)
En fait voici ce que je cherche à faire
Remplacer une partie des liens suivants
http://test/Cedric/Offres_de_prix/2004/0648540A.zip
http://test/Cedric/Offres_de_prix/2004/0648541A.zip
http://test/Cedric/Offres_de_prix/2004/0648542A.zip
par çà :
http://test/Cedric/OFFRES/2004/0648540A.zip
http://test/Cedric/OFFRES/2004/0648541A.zip
http://test/Cedric/OFFRES/2004/0648542A.zip
Ma feuille s'appelle GLOBAL, donc en théorie ca doit donner ceci :
Sub RemplacementTexteDesLiens()
Dim Cell As Range
Dim Txt As String
On Error Resume Next
For Each Cell In Sheets("GLOBAL").UsedRange.Cells
Txt = Cell.Hyperlinks(1).TextToDisplay
Cell.Hyperlinks(1).TextToDisplay = Application.Substitute(Txt, "Offres_de_prix", "OFFRES")
Next Cell
End Sub
Mais ça ne marche pas peux tu m'aider à trouver l'erreur ?
Merci d'avance
XXXXXXXXXXXXXXXXXXXXx
CC
|