Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
workbooks.open - another option
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is there a template option for Workbooks.Add(xlWBATWorksheet)? | Excel Discussion (Misc queries) | |||
workbooks.open function fails to open an existing excel file when used in ASP, but works in VB. | Excel Programming | |||
I want to merge two workbooks but the option is greyed out. Why? | Excel Discussion (Misc queries) | |||
Excel 2003 Workbooks.Open with CorruptLoad=xlRepairFile fails on Excel 5.0/95 file due to Chart, with Error 1004 Method 'Open' of object 'Workbooks' failed | Excel Programming | |||
Workbooks.Open / .Open Text - How do you stop the .xls addition? | Excel Programming |