» 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
- F1 Get the Most out of Excel! The Ultimate Excel tip Help Guide
- Analyzing Markets, Products, and Marketing Plans
- Microsoft Access 2002 for Dummies
- Real Estate Finance and Investments (Real Estate Finance and Investments, 11th Ed)
- Managing by the Numbers: A Commonsense Guide to Understanding and Using Your Company's Financials: An Essential Resource for Growing Businesses
No comments have been submitted.

