Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 276
Default Setting Default Save Path

What code is there so that i can set the deafult save path to a network
address?
Would i place this in the WorkBook code ?
Regards
Corey....


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Setting Default Save Path


I googled this!......it should help

Visual Studio Tools for the Microsoft Office System
How to: Get and Set the Default File Path for Workbooks

The DefaultFilePath property gets or sets the path that Microsoft
Office Excel 2003 uses for loading and saving files. You can display
the results in a named range.

Place the following code in the Sheet1.vb or Sheet1.cs file to display
the path for loading and saving Excel files. The code requires a
NamedRange control named defaultSavePath in a worksheet, where it
displays the path.

To display the default save path in a NamedRange control
Assign the default file path to the NamedRange control.

Visual Basic Copy CodeMe.defaultSavePath.Value2 =
Me.Application.DefaultFilePath

C# Copy Codethis.defaultSavePath.Value2 =
this.Application.DefaultFilePath;


You can set the default save path by assigning the path to the
DefaultFilePath property of the Application object.

To set the default save path by reading text from a NamedRange control
Assign the string value of defaultSavePath to the DefaultFilePath
property of the Application object.

Visual Basic Copy CodeMe.Application.DefaultFilePath =
Me.defaultSavePath.Value2.ToString()

C# Copy Codethis.Application.DefaultFilePath =
this.defaultSavePath.Value2.ToString();


Compiling the Code
This code requires a NamedRange control named defaultSavePath in a
worksheet.

This code must be placed in a sheet class, not in the ThisWorkbook
class.


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=557950

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
microsoft query in excel default save path George Applegate Excel Discussion (Misc queries) 0 January 2nd 07 11:06 PM
Setiiing up file name & path as a default setting on all sheets/ta Paul Canal Excel Discussion (Misc queries) 3 March 31st 06 01:07 PM
Setting a default save folder for a template postitnote100 Excel Discussion (Misc queries) 1 July 8th 05 09:30 PM
change default file path in Save As dialog box charles[_2_] Excel Programming 3 August 6th 04 03:03 AM
Can I change ExCels default save path for saving add-ins ? RandyDtg1 Excel Programming 3 May 16th 04 04:07 PM


All times are GMT +1. The time now is 08:11 PM.

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

About Us

"It's about Microsoft Excel"