Basic > GetPath
'参照設定:Windows Script Host Object Model
Option Explicit
Private Basic As Basic
Private Wsh As WshShell
Public Property Set SetBasic(ByRef obj As Basic)
Set Basic = obj
End Property
Public Property Set SetWsh(ByRef obj As WshShell)
Set Wsh = obj
End Property
Public Function DeskTop() As String
DeskTop = Wsh.SpecialFolders("DeskTop")
End Function
Public Function Startup() As String
Startup = Wsh.SpecialFolders("Startup")
End Function
Public Function Downloads() As String
Downloads = Replace(DeskTop, "Desktop", "Downloads")
End Function
このままでは、動きませんので、ご注意。