+ Reply to Thread
Results 1 to 7 of 7

Save Active Sheet As New Workbook in same folder of the original workbook

  1. #1
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Save Active Sheet As New Workbook in same folder of the original workbook

    Hi... i have a file where i have a macro to export the active sheet to a new workbook and save it. The problem is the macro exports the data and saves the file but in documents folder, and i would like it saves directly in the same folder where the original file is. Need to say that the folder where is the original file may vary. The code i have in the present is this:

    Please Login or Register  to view this content.
    but this saves in Mydocuments :/

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,583

    Re: Save Active Sheet As New Workbook in same folder of the original workbook

    Try this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Save Active Sheet As New Workbook in same folder of the original workbook

    Perfect. Thank you very much

    EDIT: Actually not good :/ though it was ok but no. The problem is described in the next post.
    Last edited by Taislin; 11-19-2012 at 06:46 PM.

  4. #4
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Save Active Sheet As New Workbook in same folder of the original workbook

    Though it was done but no.... Now its saving in Desktop :/ and i'm getting the file name of the exported sheet workbook as "EPT V8Exported Report". The original file is iside a folder in Desktop named as EPT V8. But as i said before this folder may vary in name and location. Any sugestions?

  5. #5
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Save Active Sheet As New Workbook in same folder of the original workbook

    Figured it out:
    need to substitute this:
    Please Login or Register  to view this content.
    by this and nows its perfect

    Please Login or Register  to view this content.
    Thansk for your help

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,583

    Re: Save Active Sheet As New Workbook in same folder of the original workbook

    Oops, always forget about the missing folder separator. Sorry.

  7. #7
    Forum Contributor
    Join Date
    06-25-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    201

    Re: Save Active Sheet As New Workbook in same folder of the original workbook

    Quote Originally Posted by Norie View Post
    Oops, always forget about the missing folder separator. Sorry.
    No problem. It was good for me to figured something out by myself too thanks for your assistance.

+ 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