Bonjour
ce petit pgm s’exécute sans erreur, mais ne me donne pas la main.

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
sub xxx()
        chemin= "C:\Documents and Settings\Admin.XPSP2-46E31CF49\Mes documents\chemin.txt"
        With OpenFileDialog1
            Do
                If Dir(chemin) <> "" Then _
                .InitialDirectory = My.Computer.FileSystem.ReadAllText(chemin)
                .FileName = ftxt
                .Filter = "Fichier texte (*.txt)|*.txt"
                If .ShowDialog = Windows.Forms.DialogResult.Cancel Then _
                  exit sub
                If My.Computer.FileSystem.FileExists(.FileName) Then
                    films = .FileName
                    Exit Do
                End If
                MsgBox "Non trouvé dans le répertoire", MsgBoxStyle.OkOnly, ftxt
            Loop
        End With
        end sub