Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get values from a closed workbook
I got this code from the website: Sub test() GetValuesFromAClosedWorkbook "C:", "Book1.xls", "Sheet1", "A1:A30" End Sub Sub GetValuesFromAClosedWorkbook(fPath As String, fName As String, _ sName, cellRange As String) With ActiveSheet.Range(cellRange) ..FormulaArray = "='" & fPath & "\[" & fName & "]" & sName & "'!" & _ cellRange ..Value = .Value End With End Sub Can someone explain how it works? It looks like the path/file name is already configured, so why (when I run the code) does an "Update Records" dialog box pop up? -- kev_06 ------------------------------------------------------------------------ kev_06's Profile: http://www.excelforum.com/member.php...o&userid=35046 View this thread: http://www.excelforum.com/showthread...hreadid=559565 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Get values from a closed workbook
See
http://www.rondebruin.nl/copy7.htm -- Regards Ron de Bruin http://www.rondebruin.nl "kev_06" wrote in message ... I got this code from the website: Sub test() GetValuesFromAClosedWorkbook "C:", "Book1.xls", "Sheet1", "A1:A30" End Sub Sub GetValuesFromAClosedWorkbook(fPath As String, fName As String, _ sName, cellRange As String) With ActiveSheet.Range(cellRange) FormulaArray = "='" & fPath & "\[" & fName & "]" & sName & "'!" & _ cellRange Value = .Value End With End Sub Can someone explain how it works? It looks like the path/file name is already configured, so why (when I run the code) does an "Update Records" dialog box pop up? -- kev_06 ------------------------------------------------------------------------ kev_06's Profile: http://www.excelforum.com/member.php...o&userid=35046 View this thread: http://www.excelforum.com/showthread...hreadid=559565 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Reading values from a closed workbook | New Users to Excel | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Getting Values From A Closed Workbook | Excel Programming | |||
Cell Values from a Closed Workbook | Excel Programming | |||
Code that retrieves values from a closed workbook | Excel Programming |