PC Review


Reply
Thread Tools Rate Thread

copy worksheet without opening the workbook

 
 
Ben
Guest
Posts: n/a
 
      16th Apr 2008
Hi all,

I would like ask if there's a way to copy a worksheet from a workbook A into
workbook B, without actually opening workbook A?

Thanks,

Ben

--

 
Reply With Quote
 
 
 
 
john
Guest
Posts: n/a
 
      16th Apr 2008
you can do it using formula.
try following:

Sub GetData()
Dim mydata As String
'data location & range to copy
mydata = "='C:\[NewBook.xls]Sheet1'!$B$2:F12" '<< change as required

'link to worksheet
With Worksheets(1).Range("B2:F12") '<< change as required
.Formula = mydata

'convert formula to text
.Copy
.PasteSpecial Paste:=xlPasteValues
End With
Application.CutCopyMode = False
End Sub

--
jb


"Ben" wrote:

> Hi all,
>
> I would like ask if there's a way to copy a worksheet from a workbook A into
> workbook B, without actually opening workbook A?
>
> Thanks,
>
> Ben
>
> --
>

 
Reply With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      16th Apr 2008
See this site:

http://www.rondebruin.nl/ado.htm

"Ben" wrote:

> Hi all,
>
> I would like ask if there's a way to copy a worksheet from a workbook A into
> workbook B, without actually opening workbook A?
>
> Thanks,
>
> Ben
>
> --
>

 
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
Can you copy a worksheet from a workbook wothout opening it? Damien McBain Microsoft Excel Programming 5 24th Jan 2008 09:25 AM
Copy Excel Worksheet to new Workbook via VBA without Links to original Workbook JamesDMB Microsoft Access Form Coding 0 21st Mar 2007 06:13 PM
Copy Data from Workbook into specific Worksheet in other Workbook? kingdt Microsoft Excel Misc 1 16th Mar 2006 06:55 PM
copy worksheet from closed workbook to active workbook using vba =?Utf-8?B?bWFuZ28=?= Microsoft Excel Worksheet Functions 6 9th Dec 2004 07:55 AM
Copy a worksheet without 'opening' workbook SteveS Microsoft Excel Programming 2 11th Oct 2004 06:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:08 PM.