View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
AA2e72E AA2e72E is offline
external usenet poster
 
Posts: 400
Default How do I save to the desktop across OS's?

If I understand you correctly, you want to know what the desktop path is:

Sub DeskTopPath()
Set objScr = CreateObject("WScript.Shell")
DeskTopPath = objScr.SpecialFolders("Desktop") & "\"
Set objScr = Nothing
MsgBox DeskTopPath
End Sub

Any document you save to the DeskTopPath appears as an icon on the desktop.
"Greg Little" wrote:

I want to save a document under another name using VBA. How do I force
it to save to the desktop across OS's? Win 98, and ME don't have
users, W2k and XP do. Do I have to write a different version for the
various versions of Windows? TIA for the help.

Greg