copying worksheet to another workbook with a macro more than once

G

Guest

I want to copy a worksheet to another workbook and break the link on the
orginal worksheet. I recorded a macro. but I can only do it once.
How can I did it several times?
 
G

Guest

Try something like:

Sub Macro1()
Windows("Book1").Activate
Sheets("rt").Copy Before:=Workbooks("Book2").Sheets(1)
Windows("Book1").Activate
Sheets("rt").Copy Before:=Workbooks("Book2").Sheets(1)
Windows("Book1").Activate
Sheets("rt").Copy Before:=Workbooks("Book2").Sheets(1)
Windows("Book1").Activate
Sheets("rt").Copy Before:=Workbooks("Book2").Sheets(1)
End Sub
 
G

Guest

Hi RF,

I used this recently, which I found in another posting:

With ActiveWorkbook
Links = .LinkSources(xlExcelLinks)
If Not IsEmpty(Links) Then
For i = 1 To UBound(Links)
.BreakLink Links(i), xlLinkTypeExcelLinks
Next i
End If
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top