LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

 
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
Reading values from a closed workbook Graham F New Users to Excel 6 July 28th 08 03:32 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Getting Values From A Closed Workbook roshinpp_77[_2_] Excel Programming 3 May 30th 06 01:36 PM
Cell Values from a Closed Workbook JK Excel Programming 4 February 22nd 06 05:31 PM
Code that retrieves values from a closed workbook Todd Huttenstine Excel Programming 1 April 28th 04 07:34 PM


All times are GMT +1. The time now is 03:06 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"