Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 101
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,726
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 101
Default Macro - Save file in Desktop

It works fine Bob. Thanks a lot for the timely help.

-Dileep

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I email amacro? leo Excel Worksheet Functions 24 August 9th 06 02:47 PM
default save as file type does not work gregf Excel Discussion (Misc queries) 5 February 10th 06 07:50 PM
Macro Save File (Unique file name) SJC Excel Worksheet Functions 5 October 27th 05 10:09 PM
macro assignments on toolbar go to 'save as' file runandrun Excel Discussion (Misc queries) 1 September 25th 05 10:55 PM
This one is tricky....Macro to save file as cell value x in di Andy Excel Discussion (Misc queries) 4 November 26th 04 08:52 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"