°»´ú"1.xls"ÀɬO§_§e¥´¶}ª¬ºA?
- ©«¤l
- 17
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 33
- ÂI¦W
- 0
- §@·~¨t²Î
- XP SP3
- ³nÅ骩¥»
- Office 2007
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-4-30
- ³Ì«áµn¿ý
- 2012-12-21
|
«Øij¤@¶}©l´N±N¡A¸ô®|»PÀɦW³]©w¦¨¤£¦PÅܼơC¤è«K¤§«á§Q¥Î¡C
¥t¥~
'The following function returns the filename without the extension from the file's full path:
Function FileNameNoExt(strPath As String) As String
Dim strTemp As String
strTemp = Mid$(strPath, InStrRev(strPath, "\") + 1)
FileNameNoExt = Left$(strTemp, InStrRev(strTemp, ".") - 1)
End Function
'The following function returns the filename with the extension from the file's full path:
Function FileNameWithExt(strPath As String) As String
FileNameWithExt = Mid$(strPath, InStrRev(strPath, "\") + 1)
End Function
'¨ú±o¸ô®|
'the following function will get the path only (i.e. the folder) from the file's ful path:
Function FilePath(strPath As String) As String
FilePath = Left$(strPath, InStrRev(strPath, "\"))
End Function |
|
|
|
|
|
|
- ©«¤l
- 17
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 33
- ÂI¦W
- 0
- §@·~¨t²Î
- XP SP3
- ³nÅ骩¥»
- Office 2007
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-4-30
- ³Ì«áµn¿ý
- 2012-12-21
|
«Øij¤@¶}©l´N±N¡A¸ô®|»PÀɦW³]©w¦¨¤£¦PÅܼơC¤è«K¤§«á§Q¥Î¡C
¥t¥~
'¨ú±o¸ô®|»PÀɦW(¤£¥]¬A°ÆÀɦW)
'The following function returns the filename without the extension from the file's full path:
Function FileNameNoExt(strPath As String) As String
Dim strTemp As String
strTemp = Mid$(strPath, InStrRev(strPath, "\") + 1)
FileNameNoExt = Left$(strTemp, InStrRev(strTemp, ".") - 1)
End Function
'¨ú±o§¹¾ãÀɦW
'The following function returns the filename with the extension from the file's full path:
Function FileNameWithExt(strPath As String) As String
FileNameWithExt = Mid$(strPath, InStrRev(strPath, "\") + 1)
End Function
'¨ú±o¸ô®|
'the following function will get the path only (i.e. the folder) from the file's ful path:
Function FilePath(strPath As String) As String
FilePath = Left$(strPath, InStrRev(strPath, "\"))
End Function |
|
|
|
|
|
|