PC Review


Reply
Thread Tools Rate Thread

Copy Excel tab (worksheet) to another Excel file

 
 
=?Utf-8?B?U3RlZmFuIHZhbiBkZXIgSG9vZnQ=?=
Guest
Posts: n/a
 
      3rd Apr 2007
Hi!

I have a question about Excel tabs (worksheets)

Is there a possibility to copy a tab-page (worksheet) from an Excel file to
another Excel file. I know that it is possible within the same Excel file,
but is it also possible to copy outside this file?

Example:
Sheet X with worksheet ABC DEF GHJ
Sheet Y

I want to copy DEF from worksheet X to sheet Y

Kind regards, Stefan van der Hooft.
 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      3rd Apr 2007
With Workbooks("Y.xls")
workbooks("X.xls").Worksheets("DEF").copy After:= _
.Worksheets(.worksheets.count)
End With

as an example. Both workbooks must be open.

--
Regards,
Tom Ogilvy


"Stefan van der Hooft" wrote:

> Hi!
>
> I have a question about Excel tabs (worksheets)
>
> Is there a possibility to copy a tab-page (worksheet) from an Excel file to
> another Excel file. I know that it is possible within the same Excel file,
> but is it also possible to copy outside this file?
>
> Example:
> Sheet X with worksheet ABC DEF GHJ
> Sheet Y
>
> I want to copy DEF from worksheet X to sheet Y
>
> Kind regards, Stefan van der Hooft.

 
Reply With Quote
 
=?Utf-8?B?U3RlZmFuIHZhbiBkZXIgSG9vZnQ=?=
Guest
Posts: n/a
 
      3rd Apr 2007
Dear Tom Ogilvy,

Thank you for your reply, however I have one question left:
- I want to copy several worksheets from several excel files through a
button on a MS Access form, is this possible with the mentioned below code?

Kind regards, Stefan van der Hooft




"Tom Ogilvy" wrote:

> With Workbooks("Y.xls")
> workbooks("X.xls").Worksheets("DEF").copy After:= _
> .Worksheets(.worksheets.count)
> End With
>
> as an example. Both workbooks must be open.
>
> --
> Regards,
> Tom Ogilvy
>
>
> "Stefan van der Hooft" wrote:
>
> > Hi!
> >
> > I have a question about Excel tabs (worksheets)
> >
> > Is there a possibility to copy a tab-page (worksheet) from an Excel file to
> > another Excel file. I know that it is possible within the same Excel file,
> > but is it also possible to copy outside this file?
> >
> > Example:
> > Sheet X with worksheet ABC DEF GHJ
> > Sheet Y
> >
> > I want to copy DEF from worksheet X to sheet Y
> >
> > Kind regards, Stefan van der Hooft.

 
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
Copy Paste failed in excel file migrated from Excel 2003 to Excel Handong Chen Microsoft Excel Crashes 1 4th Mar 2010 06:05 PM
How to copy worksheet from one excel file to another Varun Microsoft Excel Programming 5 25th Mar 2009 12:10 AM
Copy Excel tab (worksheet) to another Excel file =?Utf-8?B?U3RlZmFuIHZhbiBkZXIgSG9vZnQ=?= Microsoft Excel Worksheet Functions 4 3rd Apr 2007 10:10 PM
Unable to Insert Worksheet/Move and copy worksheet Excel 2003 lukerush Microsoft Excel Worksheet Functions 4 7th Sep 2006 05:05 PM
Copy a worksheet to another excel file =?Utf-8?B?TWlrZSBTLg==?= Microsoft Excel Discussion 4 10th Jun 2005 11:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:21 AM.