Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i know that the following UDF will retrieve specified information from a
closed notebook: Function GetValuesFromAClosedWorkbook(fPath As String, _ fName As String, sName, cellRange As Object) With ActiveSheet.cellRange .FormulaArray = "='" & fPath & "\[" & fName & "]" _ & sName & "'!" & cellRange .Value = .Value End With End Function Sub test1() GetValuesFromAClosedWorkbook "E:\Documents\Work\Fraud Detection", "DFDDEPFRDH.xls", _ "Untitled", .Select End Sub i have 2 questions. 1) how can i alter this so it will copy the entire worksheet over? 2) How can i alter this to copy a second set of sheets to Sheet2 instead of Sheet1? thanks for your time. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe this
http://www.rondebruin.nl/copy7.htm But for a whole sheet I think you can better open the workbook and copy the sheet to your workbook -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "edluver" wrote in message ... i know that the following UDF will retrieve specified information from a closed notebook: Function GetValuesFromAClosedWorkbook(fPath As String, _ fName As String, sName, cellRange As Object) With ActiveSheet.cellRange .FormulaArray = "='" & fPath & "\[" & fName & "]" _ & sName & "'!" & cellRange .Value = .Value End With End Function Sub test1() GetValuesFromAClosedWorkbook "E:\Documents\Work\Fraud Detection", "DFDDEPFRDH.xls", _ "Untitled", .Select End Sub i have 2 questions. 1) how can i alter this so it will copy the entire worksheet over? 2) How can i alter this to copy a second set of sheets to Sheet2 instead of Sheet1? thanks for your time. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pulling Information from different workbook pages | New Users to Excel | |||
Pulling cell information from one workbook to another | Excel Worksheet Functions | |||
Reading information from a closed workbook | Excel Programming | |||
Pulling all information right of this "(" | Excel Discussion (Misc queries) | |||
Accessing Closed Workbook Information | Excel Programming |