ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Save Excel workbook to Desktop Using a Macro (https://www.excelbanter.com/excel-programming/358508-save-excel-workbook-desktop-using-macro.html)

Marvin

Save Excel workbook to Desktop Using a Macro
 
Looking for macro code that will save the current workbook to the desktop of
the current user that is signed on to XP.

Ron de Bruin

Save Excel workbook to Desktop Using a Macro
 
Hi Marvin

Test this one

Sub Desktoptest()
Dim WSHShell As Object
Dim DesktopPath As String
Set WSHShell = CreateObject("WScript.Shell")
DesktopPath = WSHShell.SpecialFolders("Desktop")
ActiveWorkbook.SaveAs DesktopPath & "\test.xls"
Set WSHShell = Nothing
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Marvin" wrote in message ...
Looking for macro code that will save the current workbook to the desktop of
the current user that is signed on to XP.




George King[_2_]

Save Excel workbook to Desktop Using a Macro
 

"Marvin" wrote in message
...
Looking for macro code that will save the current workbook to the desktop
of
the current user that is signed on to XP.


Try he
http://groups.google.com/group/micro...@tkms ftngp08

Good luck,
George




All times are GMT +1. The time now is 12:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com