首先:
工程-->引用-->Windows Script Host Object Model-->确定然后试下面的代码
Private Sub Command1_Click()
    Dim Wshshell As IWshShell_Class
    Set Wshshell = CreateObject("WScript.Shell")
    MsgBox Wshshell.SpecialFolders("DeskTop")
End Sub