Bonjour à tous,

voila je viens de récupérer un fichier PTT. Dans ce fichier il y a une macro, elle permet de faire la liaison avec un fichier excel, afin de le mettre à jour.
Mais voila mon problème le nom du fichier excel ayant changé je dois le modifier dans la macro (du moins je pense).
Mais je ne sais pas, lire cette macro. serait il possible de me l'expliquer?
Sub Maj_liens()
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
34
35
36
37
38
39
40
41
42
43
44
'
 
' Déclaration des variables
 
    Dim Forme As PowerPoint.Shape
    Dim Diapo As PowerPoint.Slide
    Dim strAncien As String
    Dim StrNew As String
 
    Dim strNouveau As String
 
 
    'Boucle sur les Slide de la présentation
    For Each Diapo In ActivePresentation.Slides
        'Boucle sur les formes
        For Each Forme In Diapo.Shapes
        'Vérifie s'il s'agit d'un objet lié
 
 
           If Forme.Type = msoLinkedOLEObject Then
 
                'Vérifie si l'objet lié est un objet tableau excel ou graphique
 
                If (Forme.OLEFormat.ProgID = "Excel.Sheet.8" Or Forme.OLEFormat.ProgID = "Excel.Chart.8") Then
                    'Modifie la source
 
                    strAncien = Forme.LinkFormat.SourceFullName
                    StrNew = Mid(strAncien, InStrRev(strAncien, "\BDD_août_2012"))
                    strNouveau = Replace(strAncien, "lyon1", "lyon")
 
                    If strAncien <> strNouveau Then
                        Forme.LinkFormat.SourceFullName = strNouveau
 
'                       'Mise à jour
                        Forme.LinkFormat.Update
                    End If
                End If
            End If
        Next
    Next
 
    ActivePresentation.Save
 
End Sub
Mon nom de pTT se nomme LYO et mon EXCEL LYOEX