+ Reply to Thread
Results 1 to 3 of 3

Simple Question..if there is such a thing in Excel

  1. #1
    Don
    Guest

    Simple Question..if there is such a thing in Excel

    Hi Gang,

    I used the "Save" and also the "SaveAs" command in a module but didn't
    specify a path.....I always thought that if no path was specified, the Save
    would follow the path that the file was opened from.....apparently not....the
    Save and the SaveAs, in my case, saved to "My Documents". This is not where
    the file was opened from. However, I was able to deal with this by
    specifying a complete path in the "Save" command.

    Is this normal behavior for VBA and is it necessary in all cases to specify
    a complete path?

    TIA,

    Don

  2. #2
    Gary Keramidas
    Guest

    Re: Simple Question..if there is such a thing in Excel

    you can use something like fpath = thisworkbook.path

    this will give you the path of the opened workbook

    i always use

    fPath = ThisWorkbook.Path & "\"
    --


    Gary


    "Don" <[email protected]> wrote in message
    news:[email protected]...
    > Hi Gang,
    >
    > I used the "Save" and also the "SaveAs" command in a module but didn't
    > specify a path.....I always thought that if no path was specified, the Save
    > would follow the path that the file was opened from.....apparently not....the
    > Save and the SaveAs, in my case, saved to "My Documents". This is not where
    > the file was opened from. However, I was able to deal with this by
    > specifying a complete path in the "Save" command.
    >
    > Is this normal behavior for VBA and is it necessary in all cases to specify
    > a complete path?
    >
    > TIA,
    >
    > Don




  3. #3
    Don
    Guest

    Re: Simple Question..if there is such a thing in Excel

    Thanks for the reply Gary, I'll give that a try. Learn something new
    everyday on here.....thanks to all you guys and gals.

    Don

    "Gary Keramidas" wrote:

    > you can use something like fpath = thisworkbook.path
    >
    > this will give you the path of the opened workbook
    >
    > i always use
    >
    > fPath = ThisWorkbook.Path & "\"
    > --
    >
    >
    > Gary
    >
    >
    > "Don" <[email protected]> wrote in message
    > news:[email protected]...
    > > Hi Gang,
    > >
    > > I used the "Save" and also the "SaveAs" command in a module but didn't
    > > specify a path.....I always thought that if no path was specified, the Save
    > > would follow the path that the file was opened from.....apparently not....the
    > > Save and the SaveAs, in my case, saved to "My Documents". This is not where
    > > the file was opened from. However, I was able to deal with this by
    > > specifying a complete path in the "Save" command.
    > >
    > > Is this normal behavior for VBA and is it necessary in all cases to specify
    > > a complete path?
    > >
    > > TIA,
    > >
    > > Don

    >
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1