ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Macro - Save file in Desktop (https://www.excelbanter.com/excel-worksheet-functions/120557-macro-save-file-desktop.html)

Dileep Chandran

Macro - Save file in Desktop
 
Hi everyone,

I was juz trying to write a macro. I am almost done. But the macro
which save the excel file in Desktop shows the file save location as
"C:\Documents and Settings\myname\Desktop".

The problem is, when someone else is running the macro the file wont
get saved in their desktop.

Can anyone help me?

-Dileep


Bob Phillips

Macro - Save file in Desktop
 
Activeworkbook.saveAs Filename:=
CreateObject("WScript.Shell").SpecialFolders("Desk top") & "\" & "myFile.xls"

--
HTH

Bob

(change the xxxx to gmail if mailing direct)
"Dileep Chandran" wrote in message
ups.com...
Hi everyone,

I was juz trying to write a macro. I am almost done. But the macro
which save the excel file in Desktop shows the file save location as
"C:\Documents and Settings\myname\Desktop".

The problem is, when someone else is running the macro the file wont
get saved in their desktop.

Can anyone help me?

-Dileep




Dileep Chandran

Macro - Save file in Desktop
 
It works fine Bob. Thanks a lot for the timely help.

-Dileep



All times are GMT +1. The time now is 03:36 PM.

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