M
Mona
I will be accessing several workbooks (test.xls, test1.xls, ...).
What is the syntax to "reference" workbook without having to open it?
thanks
-Mona
Set wbkTarget = Workbooks.open(Filename:="c:\ test.xls")
If wbkTarget Is Nothing Then
MsgBox "Can not open file"
Else
Set wksTarget = wbkTarget.Sheets("Summary")
If wksTarget Is Nothing Then
MsgBox "Could not locate sheet"
Else
lRow_2006 = Sheets("Summary").Range("A" & _
Sheets("Summary").Rows.count).End(xlUp).Row
End If
End If
What is the syntax to "reference" workbook without having to open it?
thanks
-Mona
Set wbkTarget = Workbooks.open(Filename:="c:\ test.xls")
If wbkTarget Is Nothing Then
MsgBox "Can not open file"
Else
Set wksTarget = wbkTarget.Sheets("Summary")
If wksTarget Is Nothing Then
MsgBox "Could not locate sheet"
Else
lRow_2006 = Sheets("Summary").Range("A" & _
Sheets("Summary").Rows.count).End(xlUp).Row
End If
End If