+ Reply to Thread
Results 1 to 2 of 2

SaveAs a Worksheet to another file/folder while keeping the original open/active

  1. #1
    Registered User
    Join Date
    06-24-2010
    Location
    Battle Creek, MI
    MS-Off Ver
    Excel 2007
    Posts
    84

    SaveAs a Worksheet to another file/folder while keeping the original open/active

    Nar5sup.xlsm is attempting to create folders and .csv files in the subfolders of Column A & Column B. The idea is to create files and folders for each folder name that changes in Column B. My problem is the runtime error (noted in the comment) in Sub WScopy.

    The problem stems from using the SaveAs but I am losing control of Nar5sup (ThisWorkbook) because it wants to close via the SaveAs process -- so I am trying to use a temporary worksheet, "Pedro.xls" so when it gets closed I can continue the loop process.

    I need help with the runtime error OR how to maintain control of Nar5sup.xlsm after I perform the SaveAs operation.

    I hope that is clear .... Dan
    Attached Files Attached Files

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: SaveAs a Worksheet to another file/folder while keeping the original open/active

    Please Login or Register  to view this content.
    Workbooks don't have ranges, worksheets do. You could use ActiveSheet (or nothing) if the correct worksheet is active when Pedro opens (or if there is only one sheet).
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] SaveAs a Worksheet to another file/folder while keeping the original open/active
    By DJBittner in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-16-2014, 12:13 PM
  2. Save sheet as CSV while keeping original file open?
    By gjwilson1216 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-04-2014, 02:34 PM
  3. [SOLVED] Open file by macro from active folder path
    By xbr088 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-26-2013, 10:11 PM
  4. [SOLVED] Macro to Import .txt file into active worksheet, keeping leading zero's
    By bwestfall in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-11-2012, 04:37 PM
  5. [SOLVED] Keep original wkbk open after SaveAs?
    By Ed in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-02-2005, 06:06 PM

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