TROUVER LE REPERTOIRE D'UN FICHIER DE PUIS SON CHEMIN
naärdin
-
6 août 2001 à 09:37
pcpunch
Messages postés1243Date d'inscriptionmardi 7 mai 2002StatutMembreDernière intervention18 février 2019
-
3 oct. 2003 à 03:09
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.
pcpunch
Messages postés1243Date d'inscriptionmardi 7 mai 2002StatutMembreDernière intervention18 février 20195 3 oct. 2003 à 03:09
Ok mais y a plus court lol :
Public Function GetPath(Chemin As String)
For i = Len(Chemin) To 1 Step -1
If Mid(Chemin, i, 1) = "" Then Exit For
Next i
GetPath = Mid(Chemin, 1, i)
End Function
gmni
Messages postés91Date d'inscriptionmercredi 6 novembre 2002StatutMembreDernière intervention20 mars 2009 27 nov. 2002 à 23:41
gmni
Messages postés91Date d'inscriptionmercredi 6 novembre 2002StatutMembreDernière intervention20 mars 2009 27 nov. 2002 à 23:39
Petit correctif pour ceux qui sont nul comme moi :
A la ligne >>
getpath = Mid$(chemin, 1, lenchemin - lenfichier +1) enlever +1
et dans le form load appliquer ca >>
MsgBox getpath("cwindows estmonfichier.exe")
3 oct. 2003 à 03:09
Public Function GetPath(Chemin As String)
For i = Len(Chemin) To 1 Step -1
If Mid(Chemin, i, 1) = "" Then Exit For
Next i
GetPath = Mid(Chemin, 1, i)
End Function
27 nov. 2002 à 23:41
27 nov. 2002 à 23:39
A la ligne >>
getpath = Mid$(chemin, 1, lenchemin - lenfichier +1) enlever +1
et dans le form load appliquer ca >>
MsgBox getpath("cwindows estmonfichier.exe")
6 août 2001 à 09:37