Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
rt rt is offline
external usenet poster
 
Posts: 11
Default copying worksheet to another workbook with a macro more than once

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default copying worksheet to another workbook with a macro more than once

Try something like:

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

--
Gary''s Student - gsnu200755


"RT" wrote:

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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 97
Default copying worksheet to another workbook with a macro more than once

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

"RT" wrote:

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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying worksheet to another workbook Dig Excel Worksheet Functions 3 October 30th 08 09:01 PM
Macro for Copying Worksheet to New Workbook MGC Excel Discussion (Misc queries) 10 August 17th 07 01:57 AM
Copying a worksheet to another workbook Dutch Excel Discussion (Misc queries) 6 August 10th 07 05:01 PM
Copying A Worksheet From Each Open Workbook to an new Workbook carl Excel Worksheet Functions 1 January 3rd 06 05:37 PM
Copying worksheet from workbook to another Mark Jackson Excel Worksheet Functions 0 January 14th 05 09:05 PM


All times are GMT +1. The time now is 02:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"