VBA has an Environ function. To get a list of all the Environ variables you can see, you can use the method at VBA Express. I use the USERPROFILE argument like this Public Function MyDocsPath() As String
MyDocsPath = Environ$("USERPROFILE") & "\My Documents\"
End Function You can also use the Windows [...]
Read More...
Read the complete post at http://www.dailydoseofexcel.com/archives/2009/02/26/get-the-path-to-my-documents-in-vba/
Posted
Feb 26 2009, 06:25 PM
by
Daily Dose of Excel