ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can we copy a sheet from workbook1 to workbook2 with out open workbook1? (https://www.excelbanter.com/excel-programming/304872-can-we-copy-sheet-workbook1-workbook2-out-open-workbook1.html)

Lee

Can we copy a sheet from workbook1 to workbook2 with out open workbook1?
 
Can we copy a sheet from workbook1 to workbook2 with out
open workbook1? How to do this. Thanks
Have a great weekend.
Lee

Chip Pearson

Can we copy a sheet from workbook1 to workbook2 with out open workbook1?
 
Lee,

Both workbooks must be open to copy a sheet from one to the
other.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Lee" wrote in message
...
Can we copy a sheet from workbook1 to workbook2 with out
open workbook1? How to do this. Thanks
Have a great weekend.
Lee




Tom Ogilvy

Can we copy a sheet from workbook1 to workbook2 with out open workbook1?
 
No. You can extract data from it. You can freeze screen updating, open it,
copy the sheet, close it, update the screen and no one will be the wiser.

--
Regards,
Tom Ogilvy

"Lee" wrote in message
...
Can we copy a sheet from workbook1 to workbook2 with out
open workbook1? How to do this. Thanks
Have a great weekend.
Lee




No Name

Can we copy a sheet from workbook1 to workbook2 with out open workbook1?
 
What I mean is by VBA code. Is it possible?
-----Original Message-----
Lee,

Both workbooks must be open to copy a sheet from one to

the
other.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Lee" wrote in

message
...
Can we copy a sheet from workbook1 to workbook2 with

out
open workbook1? How to do this. Thanks
Have a great weekend.
Lee



.


Ron de Bruin

Can we copy a sheet from workbook1 to workbook2 with out open workbook1?
 
You have to open it.
But with "Application.ScreenUpdating = False" you don't notice this

This example open C:\data\ron.xls and copy a sheet to your ActiveWorkbook
After that it will close C:\data\ron.xls

Sub test()
Dim Wb1 As Workbook
Dim Wb2 As Workbook
Application.ScreenUpdating = False
Set Wb1 = ActiveWorkbook
Set Wb2 = Workbooks.Open("C:\data\ron.xls")
Wb2.Sheets("Sheet1").copy _
after:=Wb1.Sheets(Sheets.Count)
Wb2.Close False
Application.ScreenUpdating = True
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


wrote in message ...
What I mean is by VBA code. Is it possible?
-----Original Message-----
Lee,

Both workbooks must be open to copy a sheet from one to

the
other.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Lee" wrote in

message
...
Can we copy a sheet from workbook1 to workbook2 with

out
open workbook1? How to do this. Thanks
Have a great weekend.
Lee



.





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com