Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Is there a function that will return the User's Name or the path to their desktop folder? -- 1scant ------------------------------------------------------------------------ 1scant's Profile: http://www.excelforum.com/member.php...o&userid=31635 View this thread: http://www.excelforum.com/showthread...hreadid=552615 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The desktop is one of the special folders:
http://support.microsoft.com/default...b;en-us;252652 HOWTO: Use the SHGetFolderPath Function from Visual Basic http://msdn.microsoft.com/library/de...nums/csidl.asp or you can use the windows scripting host: Create a link to the Windows Scripting Host Runtime libary C:\WINDOWS\SYSTEM\WSHOM.OCX Name is: IWshRuntimeLibrary In Tools=References in the VBE it will be listed as: Windows Scripting Host Object Model or something similar. You can use this to get your desktop location: Sub Tester15() Dim wsh As New IWshShell_Class Dim DesktopPath As String DesktopPath = wsh.SpecialFolders.Item("Desktop") msgbox DeskTopPath end Sub or without setting the reference Sub Tester16() Dim wsh As Object Dim DesktopPath As String set wsh = CreateObject("wscript.shell") DesktopPath = wsh.SpecialFolders.Item("Desktop") msgbox DeskTopPath end Sub -- Regards, Tom Ogilvy "1scant" wrote: Is there a function that will return the User's Name or the path to their desktop folder? -- 1scant ------------------------------------------------------------------------ 1scant's Profile: http://www.excelforum.com/member.php...o&userid=31635 View this thread: http://www.excelforum.com/showthread...hreadid=552615 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() :) Beautiful! And I got your reply just at the right time. -- 1scant ------------------------------------------------------------------------ 1scant's Profile: http://www.excelforum.com/member.php...o&userid=31635 View this thread: http://www.excelforum.com/showthread...hreadid=552615 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel user's manual | Excel Discussion (Misc queries) | |||
EXCEL FILES SAVED TO DESKTOP WILL NOT OPEN FROM DESKTOP | Excel Discussion (Misc queries) | |||
hyperlink navigation path path wrong in Excel 2003 | Excel Discussion (Misc queries) | |||
How can VBA retrieve user's IP Address | Excel Programming | |||
insert a user's name/id | Excel Discussion (Misc queries) |