+ Reply to Thread
Results 1 to 3 of 3

Import Macro to import separate files to separate worksheets - deletes existing worksheets

  1. #1
    Registered User
    Join Date
    07-07-2015
    Location
    Wash DC
    MS-Off Ver
    10
    Posts
    57

    Import Macro to import separate files to separate worksheets - deletes existing worksheets

    I have a script that imports mulitple .csv files into seperate worksheets - works great... However, when it imports all the files, it deletes any existing pages - ie a summary sheet..... Is there any eay way to set it so it doesn't removed any existing worksheets after the import


    THis is the script
    Please Login or Register  to view this content.
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Last edited by 6StringJazzer; 09-01-2015 at 10:32 AM.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: Import Macro to import separate files to separate worksheets - deletes existing worksh

    You are putting the sheets into the first of the CSV files, so that sheet does not exist. You can control which workbook you are putting all the sheet into - this uses the activeworkbook:

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    07-07-2015
    Location
    Wash DC
    MS-Off Ver
    10
    Posts
    57

    Re: Import Macro to import separate files to separate worksheets - deletes existing worksh

    Thanks much - I see what you mean now.... DOH

    Added to Rep... thanks again...

+ 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. import multiple XER files into separate Excel Spreadsheets
    By amchale in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-20-2014, 11:41 AM
  2. [SOLVED] Split worksheets to separate files
    By ksteffin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-10-2013, 06:04 AM
  3. [SOLVED] Import multiple csv files into current workbook as separate sheets
    By santosh in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-31-2013, 04:19 AM
  4. Separate several worksheets into excel files
    By mnp101 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-09-2013, 11:13 PM
  5. Pause Macro, Import From Separate Book
    By pichon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-06-2011, 11:38 AM
  6. Replies: 50
    Last Post: 02-12-2010, 01:35 PM
  7. Macro to auto-email separate worksheets of same workbook to separate recipients?
    By Sean Anderson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-09-2007, 09:51 PM
  8. Import 2 text files into 2 separate columns?
    By tcurrier in forum Excel General
    Replies: 3
    Last Post: 02-11-2006, 03:13 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