Share via

Function to return the path to the current users "Desktop" folder

Anonymous
2011-10-29T14:05:20+00:00

Is there a function that can be used in Access VBA to return the path to the current users "Desktop" folder?

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2011-10-29T14:59:30+00:00

Try this:

Dim strPath As String

strPath = CreateObject("WScript.Shell").SpecialFolders("Desktop")

See http://msdn.microsoft.com/en-us/library/0ea7b5xe(v=vs.85).aspx for the other folder paths that you can retrieve using this method.

Was this answer helpful?

8 people found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful