+ Reply to Thread
Results 1 to 2 of 2

export data from a worksheet to a NEW workbook

  1. #1
    Registered User
    Join Date
    08-10-2012
    Location
    NZ
    MS-Off Ver
    Excel 2010
    Posts
    8

    export data from a worksheet to a NEW workbook

    Hi all,

    I have code that transfers data from a worksheet a user selects to a new workbook, which allows the user to use the data as they please without corrupting the master spreadsheet. This works fine on my computer, but users are accessing this spreadsheet off a document archive system so they run into problems... My first thought would be to get rid of the .SaveAs line of code but would appreciate some expert opinion as I have to release this live and cannot error check myself.

    The code is as follows:

    WhichSheet is a worksheet variable based on the user's selection
    WSName is a string variable which holds the name of the worksheet the user selected
    ExportWorkbook is a workbook variable for the newly created spreadsheet

    Please Login or Register  to view this content.
    Any help is kindly appreciated

  2. #2
    Registered User
    Join Date
    08-10-2012
    Location
    NZ
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: export data from a worksheet to a NEW workbook

    Well I bit the bullet and took out the .SaveAs line. This seems to have worked and has the added bonus of decreasing execution time by 2 1/2 seconds too! I wonder if there is any value to the With ExportWorkbook code at all...?

+ 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