Hi Everyone,

I am facing a compatibility issue in excel 2007 & 2010.

The following piece of code works fine in Excel 2007 & 2003.

Set oSheet = Workbooks(2).Worksheets(1)
Set range = oSheet.UsedRange

StartRow = range.Cells(1, 2)
But when i run this code in Excel 2010 Its throwing the below error in this line " StartRow = range.Cells(1, 2) "

Run Time error 13 : Type Mismatch

Am I missing anything here. Please suggest. Thank you in advance