Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Copy Values From A Non-Open Workbook?

I wish to copy data (values only) from
Workbooks("A").Worksheets("A").Range("A") into
Workbooks("B").Worksheets("B").Range("B") without opening Workbook A. Is this
possible?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default Copy Values From A Non-Open Workbook?

='C:\Directory\[excelfile.xls]Sheet1'!A1

This formula will get the data for you (you will have to change the directory
and file name of course). This formula only retrieves data not formulas

HTH

Regards



--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200603/1
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Copy Values From A Non-Open Workbook?

Not directly. He meant do it with code I am sure (this is the fastest way to
do it)

say you wanted A1:A10 from sheet1 of the closed work in F1:F10 of the
activesheet


Sub GetDate()
With Range("F1:F10")
.Formula = "='C:\Directory\[excelfile.xls]Sheet1'!A1"
.Formula = .Value
End With
End Sub

If you closed file is like a data base and you want to "pull the data", you
can use ADO.
http://www.erlandsendata.no/english/...php?t=envbadac

Another way is to open the file after you turn screen updating off.
Transfer the information, then close it.

Application.ScreenUpdating = False
' open the file and get the info
Application.ScreenUpdating = True

no one is the wiser unless it takes a long time to open the workbook.

--
Regards,
Tom Ogilvy




"Jeffrey_Chcgo" wrote:

Thanks for your response. You mean enter
='C:\Directory\[excelfile.xls]Sheet1'!A1 as a cell formula? I am sorry but I
think I was unclear about my problem. I am looking for a way to copy a range
from an un-opened Workbook A into an opened workbook B using VBA. Can this
be done?

Thanks again for your consideration.

"Crowbar via OfficeKB.com" wrote:

='C:\Directory\[excelfile.xls]Sheet1'!A1

This formula will get the data for you (you will have to change the directory
and file name of course). This formula only retrieves data not formulas

HTH

Regards



--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200603/1

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Copy Values From A Non-Open Workbook?

Thanks for your response. You mean enter
='C:\Directory\[excelfile.xls]Sheet1'!A1 as a cell formula? I am sorry but I
think I was unclear about my problem. I am looking for a way to copy a range
from an un-opened Workbook A into an opened workbook B using VBA. Can this
be done?

Thanks again for your consideration.

"Crowbar via OfficeKB.com" wrote:

='C:\Directory\[excelfile.xls]Sheet1'!A1

This formula will get the data for you (you will have to change the directory
and file name of course). This formula only retrieves data not formulas

HTH

Regards



--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200603/1

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
Copy Worksheet from one open workbook to another... sopranoiam Excel Worksheet Functions 0 August 17th 07 05:12 PM
Macro to close workbook and re-open new copy Dave Lagergren Excel Discussion (Misc queries) 2 February 28th 07 10:11 PM
Macro to open workbook and copy and paste values in to orig workbo Dena X Excel Worksheet Functions 1 December 15th 05 11:13 PM
copy row to another open workbook Bill Excel Programming 1 August 15th 05 07:26 PM
Does Workbook need to be open to copy to..from vba Dale[_15_] Excel Programming 1 December 11th 04 05:31 PM


All times are GMT +1. The time now is 10:20 AM.

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"