» Getting Values From A Closed Workbook using VBA in Microsoft Excel
CATEGORY - Files, Workbook, and Worksheets in VBA
VERSION - All Microsoft Excel Versions
Place the code below into the standard module
Sub test()
GetValuesFromAClosedWorkbook "C:", "Book1.xls", _
"Sheet1", "A1:K30"
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
Book Store:
Recommended Books:
- The 11 Immutable Laws of Internet Branding
- The Essential 55: An Award-Winning Educator's Rules for Discovering the Successful Student in Every Child
- Financial Risk Manager Handbook, Second Edition
- Windows XP All-in-One Desk Reference For Dummies
- Microsoft Office XP Step-By-Step (With CD-ROM)
- Microsoft Outlook Version 2002 Step by Step (With CD-ROM)
No comments have been submitted.

