Desktop path

D

Dave Peterson

VBA?

If yes, then one way:

Option Explicit
Sub testme()
Dim myDesktopPath As String
myDesktopPath = CreateObject("WScript.Shell").SpecialFolders("Desktop")
MsgBox myDesktopPath
End Sub
 
E

Edson

tkx, Dave.

Dave Peterson said:
VBA?

If yes, then one way:

Option Explicit
Sub testme()
Dim myDesktopPath As String
myDesktopPath = CreateObject("WScript.Shell").SpecialFolders("Desktop")
MsgBox myDesktopPath
End Sub
 
H

Harlan Grove

Dave Peterson said:
If yes, then one way: ....
Sub testme()
Dim myDesktopPath As String
myDesktopPath = CreateObject("WScript.Shell").SpecialFolders("Desktop")
MsgBox myDesktopPath
End Sub
....

If users haven't gotten too creative, it's usually

Environ("USERPROFILE") & "\Desktop"
 
Top