PC Review


Reply
Thread Tools Rate Thread

Desktop path

 
 
Edson
Guest
Posts: n/a
 
      16th May 2007
How can I refer to user's desktop path using VB?
Tks in advance


 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      16th May 2007
VBA?

If yes, then one way:

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



Edson wrote:
>
> How can I refer to user's desktop path using VB?
> Tks in advance


--

Dave Peterson
 
Reply With Quote
 
Edson
Guest
Posts: n/a
 
      16th May 2007

tkx, Dave.

"Dave Peterson" <(E-Mail Removed)> escreveu na mensagem
news:(E-Mail Removed)...
> VBA?
>
> If yes, then one way:
>
> Option Explicit
> Sub testme()
> Dim myDesktopPath As String
> myDesktopPath = CreateObject("WScript.Shell").SpecialFolders("Desktop")
> MsgBox myDesktopPath
> End Sub
>
>
>
> Edson wrote:
>>
>> How can I refer to user's desktop path using VB?
>> Tks in advance

>
> --
>
> Dave Peterson



 
Reply With Quote
 
Harlan Grove
Guest
Posts: n/a
 
      17th May 2007
Dave Peterson <peter...@verizonXSPAM.net> wrote...
....
>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"

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Desktop path? Gary Keramidas Microsoft Excel Programming 1 1st Sep 2008 04:47 PM
Re: Desktop path? Dave Peterson Microsoft Excel Programming 0 1st Sep 2008 03:36 PM
How to path to user's desktop 1scant Microsoft Excel Programming 2 16th Jun 2006 03:52 PM
Finding Desktop Path Danielle Microsoft Windows 2000 Registry Archive 4 20th Feb 2004 03:12 PM
Desktop Path George Windows XP Basics 3 1st Oct 2003 09:44 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:28 PM.