Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I save to the desktop across OS's?
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I save to the desktop across OS's?
Hi,
I use VBscript for this in w95 , w98 , Me .Must be possible in VBA : Set MyShell = Wscript.CreateObject("WScript.Shell") Set MyFile = CreateObject("Scripting.FileSystemObject") strDesktop = MyShell.SpecialFolders("Desktop") MyFile.DeleteFile strDesktop & "\TheFileYouWantToDelete" hth Gys "Greg Little" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Desktop Save Question | Excel Discussion (Misc queries) | |||
Macro - Save file in Desktop | Excel Worksheet Functions | |||
Save to default desktop | Excel Discussion (Misc queries) | |||
Save as not working for laptop to desktop | Excel Worksheet Functions | |||
Save web page as desktop file from Excel/VBA | Excel Programming |