» 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:
- Finance and Accounting for Nonfinancial Managers
- The Interpretation of Financial Statements
- Who Moved My Cheese? An Amazing Way to Deal with Change in Your Work and in Your Life
- Microsoft Access Version 2002 Step by Step
- F1 Get the Most out of Excel! The Ultimate Excel tip Help Guide
- Keys to Reading an Annual Report (Barron's Business Keys)
No comments have been submitted.

