Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
microsoft query in excel default save path | Excel Discussion (Misc queries) | |||
Setiiing up file name & path as a default setting on all sheets/ta | Excel Discussion (Misc queries) | |||
Setting a default save folder for a template | Excel Discussion (Misc queries) | |||
change default file path in Save As dialog box | Excel Programming | |||
Can I change ExCels default save path for saving add-ins ? | Excel Programming |