Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default pulling information from a closed workbook

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default pulling information from a closed workbook

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
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
Pulling Information from different workbook pages RedFive New Users to Excel 10 September 4th 08 03:29 PM
Pulling cell information from one workbook to another Quinci Excel Worksheet Functions 3 January 29th 08 02:12 PM
Reading information from a closed workbook yhockman1 Excel Programming 2 March 15th 06 01:25 PM
Pulling all information right of this "(" Mcobra41 Excel Discussion (Misc queries) 2 March 15th 05 08:33 PM
Accessing Closed Workbook Information Loomah Excel Programming 1 January 29th 04 01:45 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"