>>What do you want to do ? More info pls.
>>Basically :
>
>>oExcel=createobject('Excel.Application')
>>with oExcel
>> .Workbooks.Open(cXLSFileName)
>> *...
>>endwith
>>Cetin
>
>I need to opena an Excel file (which you code explains), then update certain columns with data. Then save and close the file.
>
>Thanks, Chris
Chris,
Updating columnwise, rowwise, ranges or particular cells differ (you could update cell by cell but it's the slowest way I know of). Anyway assuming you would update col12, rows5-10 :
With oExcel
.WorkBooks.Open(lcXLSFile)
With .ActiveWorkBook
With .ActiveSheet
.Cells(5, 12).Value = lnValue1
.Cells(6, 12).Value = lnValue2
.Cells(7, 12).Value = lnValue3
.Cells(8, 12).Value = lnValue4
.Cells(9, 12).Value = lnValue5
.Cells(10, 12).Value = lnValue6
Endwith
Endwith
Cetin