PC Review


Reply
Thread Tools Rate Thread

Default Save Location

 
 
ianripping
Guest
Posts: n/a
 
      22nd Jun 2004
I am using the code:

MyName = Application.Dialogs(xlDialogSaveAs).Show
If MyName = False Then MsgBox "You cancelled the Sav
operation",vbInformation, "Cancelled"

to bring up a prompt to ask where the file would like to be saved, i
there anyway of making this promt open up in a default directory? e
c:\, even if the origional file is saved in another directory, e
d:\dat

--
Message posted from http://www.ExcelForum.com

 
Reply With Quote
 
 
 
 
Don Guillett
Guest
Posts: n/a
 
      22nd Jun 2004
Have you tried as the first line

ChDir "e:\mydir"
--
Don Guillett
SalesAid Software
(E-Mail Removed)
"ianripping >" <<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I am using the code:
>
> MyName = Application.Dialogs(xlDialogSaveAs).Show
> If MyName = False Then MsgBox "You cancelled the Save
> operation",vbInformation, "Cancelled"
>
> to bring up a prompt to ask where the file would like to be saved, is
> there anyway of making this promt open up in a default directory? eg
> c:\, even if the origional file is saved in another directory, eg
> d:\data
>
>
> ---
> Message posted from http://www.ExcelForum.com/
>



 
Reply With Quote
 
keepITcool
Guest
Posts: n/a
 
      22nd Jun 2004
Ian,
you'll have to change directories before calling the proc
(vba. can be left out)

const APPPATH as string = "e:\my folder"
dim curPath as string

on error goto theend

'store current
curpath = vba.curdir

'change drive (chdrive uses first letter only)
vba.chdrive apppath
'change directory
vba.chdir apppath

do your stuff


theend: 'restore original path
vba.chdrive curpath
vba.chdir curpath




keepITcool

< email : keepitcool chello nl (with @ and .) >
< homepage: http://members.chello.nl/keepitcool >


ianripping <<(E-Mail Removed)>> wrote:

> I am using the code:
>
> MyName = Application.Dialogs(xlDialogSaveAs).Show
> If MyName = False Then MsgBox "You cancelled the Save
> operation",vbInformation, "Cancelled"
>
> to bring up a prompt to ask where the file would like to be saved, is
> there anyway of making this promt open up in a default directory? eg
> c:\, even if the origional file is saved in another directory, eg
> d:\data
>
>
> ---
> Message posted from http://www.ExcelForum.com/
>
>


 
Reply With Quote
 
Tom Ogilvy
Guest
Posts: n/a
 
      22nd Jun 2004
Chdir (as shown) would be effective if E is already the default drive. If
not, you need to change the default drive as well

ChDrive "E"
ChDir "E:\MyDir"

--
Regards,
Tom Ogilvy


"Don Guillett" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Have you tried as the first line
>
> ChDir "e:\mydir"
> --
> Don Guillett
> SalesAid Software
> (E-Mail Removed)
> "ianripping >" <<(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I am using the code:
> >
> > MyName = Application.Dialogs(xlDialogSaveAs).Show
> > If MyName = False Then MsgBox "You cancelled the Save
> > operation",vbInformation, "Cancelled"
> >
> > to bring up a prompt to ask where the file would like to be saved, is
> > there anyway of making this promt open up in a default directory? eg
> > c:\, even if the origional file is saved in another directory, eg
> > d:\data
> >
> >
> > ---
> > Message posted from http://www.ExcelForum.com/
> >

>
>



 
Reply With Quote
 
ianripping
Guest
Posts: n/a
 
      22nd Jun 2004
Thanks that works

--
Message posted from http://www.ExcelForum.com

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro - save to current location vs excel default location leezard Microsoft Excel Misc 0 28th Oct 2008 03:04 PM
Default save location Brian Windows XP Basics 6 24th Jan 2004 12:04 AM
Re: default save location!! Thomas A. Rowe Microsoft Frontpage 0 12th Jan 2004 03:25 PM
Re: default save location!! Kevin Spencer Microsoft Frontpage 0 12th Jan 2004 03:18 PM
Default Save Location Microsoft Windows 2000 File System 0 4th Nov 2003 07:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:51 PM.