Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help needed... please (Copy Past Macro)
Hello,
I am trying to create a macro based on information provided to me by JR Form (thank you very much by the way). I would like the Macro to copy 9 tabs from an existing workbook into a new workbook and then break all the links in the new work book from the old one. This is what I have so far and I can't seem to get it to work can any one help me? Thanks a ton :) Sub CopyTheSheets() Dim DestWB As Workbook Dim ws As Worksheet Dim Wrkbk As String LinkPath = ActiveWorkbook.FullName Mastr = ActiveWorkbook.Name 'Wrkbk = Sheets("Instructions").Range("A41") Set DestWB = Workbooks(Wrkbk) For Each ws In ThisWorkbook.Worksheets With DestWB.Worksheets ws.Copy after:=.Item(.Count) Linkage (LinkPath) ActiveWorkbook.Save Windows(Mastr).Activate End With End Sub Function Linkage(link1 As String) ActiveWorkbook.ChangeLink link1, ActiveWorkbook.FullName, xlExcelLinks End Function |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy & Past Macro Question | Excel Programming | |||
Copy and Past Macro | Excel Programming | |||
Macro to copy and past a new row when the a row is filled in. | Excel Programming | |||
Copy Past with macro | Excel Programming | |||
Macro to copy and past selected rows only... | Excel Programming |