0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【ExcelVBA】実行者のデスクトップパスおよびダウンロードパスの取得(Basic > GetPath)

Last updated at Posted at 2023-06-24

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

このままでは、動きませんので、ご注意。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?