Cetin
Thanks for being so patient
I dropped an olecontrol and a button on a form
I tried your code as follows in the button click
With thisform.OleControl1
.Navigate2('file://c:\global\mertest.xls')
Do While .ReadyState # 4 && Wait for ready state
EndDo
endwith
oXLS = thisform.OleControl1.object.document
oExcel = oXLS.Application
* Test setting column A,B to red
oExcel.ActiveWorkbook.ActiveSheet.Range('A:B').Interior.ColorIndex = 3
I get ole error code 0x80020006 unknown name against the navigate line.
The file exists
What have I done wrong?
Thanks
Colin
Specialist in Advertising, Marketing, especially Direct Marketing
I run courses in Business Management and Marketing