| すぐマク YNxv9124 | Home | Search | Contents | Gallery | Introduction | Service | Support | What's New! |
| フルパスから拡張子の付いてないファイル名を取得するには? |
|
|
|||
|
こんにちは。 かみちゃん です。 FileSystemObject(FSO) の GetBaseNameメソッドを使えばできます。
Sub Macro1()
Dim FSO
Dim strFileName As String
strFileName = "C:\Documents and Settings\My Documents\災害\写真\9.8撮影\CIMG0390.JPG"
Set FSO = CreateObject("Scripting.FileSystemObject")
MsgBox FSO.GetBaseName(strFileName)
End Sub
FSOについては、以下が参考になると思います。http://www.officetanaka.net/excel/vba/filesystemobject/index.htm |
| http://www.happy500z.com/ | Home | Contents | Gallery | Introduction | Service | Support | What's New! |