+ Reply to Thread
Results 1 to 2 of 2

Cutting sheets from workbook and saving elsewhere using list?

  1. #1
    Registered User
    Join Date
    08-01-2007
    Posts
    49

    Cutting sheets from workbook and saving elsewhere using list?

    Hi guys,

    thanks for your time in reading this, and hopefully helping me manage to do this

    attached is a zip folder called distribution.zip, in there are two files one called:
    distlist.xls and the other called run_rate.xls

    basically what i want doing is from the distlist.xls file is a list of cost centres (worksheet: "Distribution" column: "A") and next to that colum is the name (Column "B") and i want that to search through the tabs of the run_rate.xls file (in the brackets of the run rate) and if its there then copy it to another file and save it in the location that is specified in distlist.xls - worksheet "where"

    hope that makes sence

    here is a running text version of what i want happening.

    Run the macro > macro looks through the distlist.xls file and matches the cost centre number with the cost centre in run_rate.xls, then does the same for every one and copies the sheet tabs into a new workbook and saved in the folder specified in distlist.xls worksheet where

    any questions ?

    thanks for your time in reading this, and hopefully someone can help me
    Attached Files Attached Files
    Last edited by VBA Noob; 10-10-2007 at 01:20 PM.

  2. #2
    Registered User
    Join Date
    08-01-2007
    Posts
    49
    Sub clearXSSheets()
    Dim ws As Worksheet
    With Application
    .DisplayAlerts = False
    .ScreenUpdating = False

    For Each ws In ThisWorkbook.Worksheets
    Select Case ws.Name
    Case "Output 1 (11111)"
    Case Else
    ws.Delete
    End Select
    Next ws
    .DisplayAlerts = True
    .ScreenUpdating = True
    End With

    End Sub
    i found that code to delete the worksheet, now is there a way for where it says the name on the tab to make it just cut instead of delete into new workshet and saave it elsewhere to the other file?

    or would it be best to copy all data into new worksheet, using a macro. then use that code above (somehow linked into the new worksheet and the distribution list) to delete unnessecery sheets nad save in the path listed in the distribution list?

    thanks

+ 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