Macro - Save file in Desktop

  • Thread starter Thread starter Dileep Chandran
  • Start date Start date
D

Dileep Chandran

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
 
Activeworkbook.saveAs Filename:=
CreateObject("WScript.Shell").SpecialFolders("Desktop") & "\" & "myFile.xls"

--
HTH

Bob

(change the xxxx to gmail if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top