Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Desktop Saving in VB

Hello...I have created a macro that moves data from a large
spreadsheet over to a new book that is much smaller size-wise for
e-mailing so it doesn't spank the e-mail server sooo hard. (original
spreadsheet is about 6MB, data needed is about 200KB). Several people
on several workstations (Windows2000) would run this macro on their
own spreadsheets for their area. My question is this: is there a way
to save this new spreadsheet using the save as commands where no
matter what machine name its on it goes to desktop for easy access?
(that way i do not have to specify the c:\Documents and
Settings\SillyNameOX25\Desktop where 'SillyNameOX25' is different
for each computer and login name)

I have inserted the code I have already


Sheets("Pumps").Move
ActiveWorkbook.SaveAs Filename:= _
DForm.Dsave & ".xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

DForm.Dsave is a pre-determined file name that is configured in a
form...FYI

I have tried an actual path, and when I do it like the way above, it
automatically saves it in the My Documents folder...wassup wit dat?
Any way to put it on the desktop?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Desktop Saving in VB

This should return the location of the desktop. I use it in VBScript, I don't know what modifications (if any) you would need to make it work in Excel

Set WshShell = WScript.CreateObject("WScript.Shell"
strDesktop = WshShell.SpecialFolders("Desktop")
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
Automaticly saving formula's to values when saving Gunti Excel Discussion (Misc queries) 8 November 11th 08 09:34 AM
EXCEL FILES SAVED TO DESKTOP WILL NOT OPEN FROM DESKTOP randy111 Excel Discussion (Misc queries) 3 January 13th 08 10:38 PM
Saving Excel Icon to Desktop Candy Excel Discussion (Misc queries) 1 January 6th 07 10:08 PM
Excel on desktop bradsdad25 Excel Discussion (Misc queries) 2 January 6th 05 10:31 PM
VBA code for: Saving to desktop? jasonsweeney[_37_] Excel Programming 2 February 3rd 04 12:17 PM


All times are GMT +1. The time now is 02:40 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"