Results 1 to 2 of 2
  1. #1
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    Terneuzen, Netherlands
    Posts
    895
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Directory on FileOpen & FileSave (EXCEL 97/2000)

    I'm using:

    <font color=blue>expression.GetOpenFilename(FileFilter, FilterIndex, Title, ButtonText, MultiSelect)</font color=blue>

    to get filename& dir for loading files and

    <font color=blue>expression.GetSaveAsFilename(InitialFil ename, FileFilter, FilterIndex, Title, ButtonText)</font color=blue>

    to get filename & dir for saving files.

    Now, as you see, with the "SaveAs"-call I can preset a default file & directory for saving ("InitialFilename" argument).
    With the "LOAD" call GetOpenFilename I cannot preset a default load-directory. Now I can of course use ChDir to point it in that direction but is there a better way / call to do that?

    Thanks,

    Erik Jan

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Default Directory on FileOpen & FileSave (EXCEL 97/2000)

    You could use sendkeys, but IMO chDir is better programming practice:

    SendKeys "Cata~"
    ' the getopenfilename command.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •