項目
ファイル名/フォルダ名変更(Name)
例
Option Compare Database
Option Explicit
'++++++++++++++++++++++++++++++++++++++++++++++++++
'■ファイル名/フォルダ名変更(Name)
'++++++++++++++++++++++++++++++++++++++++++++++++++
Private Sub コマンド2_Click()
On Error GoTo err_handle
Dim oldpathname As String
Dim newpathname As String
oldpathname = "c:\temp\hoge.txt" '元
newpathname = "c:\temp\hogehoge.txt" '変更後
Name oldpathname As newpathname 'ファイル名変更
Exit Sub
err_handle:
Debug.Print Err.Description
End Sub