M
Markus
The following will return the values on a sheet in a
closed workbook and write them to the same range on the
active worksheet. I want to write them to a specified
range on an inactive worksheet. Instead of the active
sheet I'd like to send it to Worksheet("SR") and Range
("A8")
Sub test()
GetValuesFromAClosedWorkbook "C:", "Book1.xls", _
"Sheet1", "A1"
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
Thanks
closed workbook and write them to the same range on the
active worksheet. I want to write them to a specified
range on an inactive worksheet. Instead of the active
sheet I'd like to send it to Worksheet("SR") and Range
("A8")
Sub test()
GetValuesFromAClosedWorkbook "C:", "Book1.xls", _
"Sheet1", "A1"
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
Thanks