Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Driectory changing

Steve,

Known problem that should be easily circumvented by issuing a

ChDrive "F"

command before the ChDir

or you could take a look at the GetSaveAsFileName method which shows a
dialog box that allows navigating circa Windows Explorer to the directory.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Steve P" wrote in message
...
I have a macro that saves a file using the getsave function
I want it to default to a specific directory. The save as
box always comes up but the directory is not always
correct. Any thoughts? I want it to come up as
f:\models\2004 strategies

' getsaveas Macro
' Change Default Directory
ChDir "F:\MODELS\2004 Strategies"

' File Filters
Filt = "Excel Files (*.xls), *.xls," & _
"All Files (*.*), *.*"

' Display *.xls as default
FilterIndex = 1

' Dialog box Caption
Title = "Select a File Name and Directory"

' Set Initial File Name
IName = "e_strategy.xls"

' Get Save as Box
filesavename = Application.GetSaveAsFilename _
(InitialFilename:=IName, _
fileFilter:=Filt, _
FilterIndex:=FilterIndex, _
Title:=Title)



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
Changing the range for averages with out changing the formula. JessLRC Excel Worksheet Functions 0 April 20th 10 03:10 PM
Changing background colour when changing data in a cell Paoul Excel Discussion (Misc queries) 7 December 26th 08 07:25 AM
Changing footers on all worksheets without changing print set up KC Excel Discussion (Misc queries) 1 October 26th 07 03:31 PM
changing a cell to changing the link Jared Excel Worksheet Functions 7 May 8th 06 08:41 AM
Changing format of number without changing the value sweetsue516 Excel Discussion (Misc queries) 2 August 22nd 05 04:07 PM


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