Nom de fichier en vba
Résolu/Fermé
wire less
Messages postés
233
Date d'inscription
lundi 5 octobre 2009
Statut
Membre
Dernière intervention
29 août 2018
-
23 nov. 2009 à 10:36
wire less Messages postés 233 Date d'inscription lundi 5 octobre 2009 Statut Membre Dernière intervention 29 août 2018 - 26 nov. 2009 à 11:47
wire less Messages postés 233 Date d'inscription lundi 5 octobre 2009 Statut Membre Dernière intervention 29 août 2018 - 26 nov. 2009 à 11:47
A voir également:
- Nom de fichier en vba
- Fichier bin - Guide
- Fichier epub - Guide
- Fichier rar - Guide
- Fichier .dat - Guide
- Comment réduire la taille d'un fichier - Guide
2 réponses
Polux31
Messages postés
6917
Date d'inscription
mardi 25 septembre 2007
Statut
Membre
Dernière intervention
1 novembre 2016
1 204
23 nov. 2009 à 12:58
23 nov. 2009 à 12:58
Bonjour,
Voilà 3 fonctions issues de la FAQ VB6 du site https://vb.developpez.com/
L'auteur est ThierryAIM
;o)
Voilà 3 fonctions issues de la FAQ VB6 du site https://vb.developpez.com/
' Comment récupérer le répertoire d'un fichier à partir de son chemin complet ? Public Function ExtractFilePath(ByVal sFullPath As String) As String If Right(sFullPath, 1) = "\" Then ExtractFilePath = sFullPath Else ExtractFilePath = Left(sFullPath, InStrRev(sFullPath, "\")) End If End Function
'Comment récupérer le nom d'un fichier à partir d'un chemin complet ? Public Function ExtractFileName(ByVal sFullPath As String) As String If InStr(sFullPath, "\") = 0 Or Right(sFullPath, 1) = "\" Then ExtractFileName = "" Exit Function End If ExtractFileName = Mid(sFullPath, InStrRev(sFullPath, "\") + 1) End Function
'Comment récupérer l'extension d'un fichier à partir d'un chemin complet ? Public Function ExtractFileExt(ByVal sFullPath As String) As String Dim sName As String sName = ExtractFileName(sFullPath) If InStr(sName, ".") = 0 Then ExtractFileExt = "" Else ExtractFileExt = Mid(sName, InStrRev(sName, ".") + 1) End If End Function
L'auteur est ThierryAIM
;o)
wire less
Messages postés
233
Date d'inscription
lundi 5 octobre 2009
Statut
Membre
Dernière intervention
29 août 2018
5
26 nov. 2009 à 11:47
26 nov. 2009 à 11:47
Parfais
Merci Polux31
Merci Polux31