Hi fellow coders..

I have followed si_the_geek's excellent tutorial on how to automate excel from vb. Works like a charm... BUT now (on a completely different project of mine) I need to append data to an excel spreadsheet that is INSIDE an ole on my form.

One thread I've read was achieving that with the following code:
Code:
Dim objXL as Object

Ole1.DoVerb (-1)
Ole1.Action = 7

Set objXL = oleTable.object.ActiveSheet
 
For i = 0 to 3
 objXL.Cells(i, 1) = "Field " & i & ":"
Next i
 
Ole1.Action = 9

Set objXL = Nothing
I assumed that "Ole1" was the name of his OLE control and gave my control the same name. When executing, Ole1.DoVerb(-1) (which I have no idea what it is), triggers a "Object doesn't support this property or method" error message.

I simply skipped over it and got a "Object required" message when executing the "Set objXL" line of code.

I double-checked and "Microsoft Excel 10.0 Object Library" is in my project's references.

Any idea what is missing here?

Note1:

Note2: This is an ole excel grid on a form that will always start empty, will never be printed or saved. The user will use my application to fill this spreadsheet and when he's all done, he'll manually copy its content and work with it on his own. This is mainly why I didn't want a new excel app/spreadsheet to be opened (like si_the_geek's methods) but rather use a OLE excel spreadsheet)

Thank you.