I had a bit of a play around, but I can't find any way to actually reference the sheet (or workbook etc) with that method.
What you could do instead (if you want to keep it inside your form) is use the OLE control, set the Class to Excel.Sheet , and then use code like this:
..or if you want to do multiple things with it, like this:Code:'OLE1.object is equivalent to a WorkBook OLE1.object.sheets(1).Cells(2, 1) = "hello"
If you are willing to have Excel run as a separate application to your program, see the Excel Tutorial link in my signature.Code:With OLE1.object.sheets(1) .Cells(2, 1) = "hello" .Cells(2, 2) = "more text" ... End With




Reply With Quote