Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy Worksheet from one open workbook to another... | Excel Worksheet Functions | |||
Macro to close workbook and re-open new copy | Excel Discussion (Misc queries) | |||
Macro to open workbook and copy and paste values in to orig workbo | Excel Worksheet Functions | |||
copy row to another open workbook | Excel Programming | |||
Does Workbook need to be open to copy to..from vba | Excel Programming |