G
goonsquad
I'm writing an Excel Automation app and I'm running to a problem early
on with what should be a basic step.
Dim oExcel As Object
Dim oBook As Object
Dim oSheet As Object
Dim oRng As Excel.Range
oExcel = CreateObject("Excel.Application")
oBook = oExcel.Workbooks.Add
oSheet = oBook.Worksheets(1)
....Populate Sheet...
oRng(Selection, ActiveCell.SpecialCells(xlLastCell)).Select()
My application will not compile due to the last line because
Selection, ActiveCell and xlLastCell are not declared. I have added
Excel 10.0 (2002) as a reference. What am I doing wrong?
on with what should be a basic step.
Dim oExcel As Object
Dim oBook As Object
Dim oSheet As Object
Dim oRng As Excel.Range
oExcel = CreateObject("Excel.Application")
oBook = oExcel.Workbooks.Add
oSheet = oBook.Worksheets(1)
....Populate Sheet...
oRng(Selection, ActiveCell.SpecialCells(xlLastCell)).Select()
My application will not compile due to the last line because
Selection, ActiveCell and xlLastCell are not declared. I have added
Excel 10.0 (2002) as a reference. What am I doing wrong?