PC Review


Reply
Thread Tools Rate Thread

copying worksheet to another workbook with a macro more than once

 
 
=?Utf-8?B?UlQ=?=
Guest
Posts: n/a
 
      13th Nov 2007
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 With Quote
 
 
 
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      13th Nov 2007
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

--
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?

 
Reply With Quote
 
=?Utf-8?B?ZXdhbjcyNzk=?=
Guest
Posts: n/a
 
      13th Nov 2007
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro for Copying Worksheet to New Workbook =?Utf-8?B?TUdD?= Microsoft Excel Misc 10 17th Aug 2007 01:57 AM
Copying a worksheet into the same workbook =?Utf-8?B?TWljaGFlbA==?= Microsoft Excel New Users 9 6th Feb 2006 08:35 PM
Copying A Worksheet From Each Open Workbook to an new Workbook =?Utf-8?B?Y2FybA==?= Microsoft Excel Worksheet Functions 1 3rd Jan 2006 05:37 PM
Copying worksheet from workbook to another =?Utf-8?B?TWFyayBKYWNrc29u?= Microsoft Excel Worksheet Functions 0 14th Jan 2005 09:05 PM
Copying worksheet to another workbook Haider Quazilbash Microsoft Excel Programming 2 22nd Sep 2003 06:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:33 AM.