Bonjour
tout d'abord un grand merci a ceux de se forum et d'autre qui mon bien aider pour démarrer sous vba.
Je suis un novice.
Mon problème j'ai une macro qui va dans un dossier spécifique qui contient des fichiers texte et qui n'affiche que le fichier voulu cela marche très bien sous microsoft xp par contre sous seven ca m'affiche tous les fichiers texte.
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 Function RechercheFichier() As String ChDrive "i:\" ChDir "i:\xxx\xxx\xxx\Xx\" Dim fd As FileDialog Dim NomFichier As String Set fd = Application.FileDialog(msoFileDialogFilePicker) With fd .Filters.Add "Fichiers texte", "*.txt" .Title = "Recherche de fichier" .InitialFileName = "Z305t01.txt" End With If fd.Show = -1 Then NomFichier = fd.SelectedItems(1) RechercheFichier = NomFichier Set fd = Nothing End Function
si quelqu'un a une idée merci
@ + gandalflegris
Partager