>In Visual FoxPro using automation (VBA) code to move around in EXCEL, I know that I can move down one row by doing something like:
>
>oRange = oRange.Offset(1,0)
>
>Or I can find out the last Row where something was actually written to a row and column, as follows:
>
>lnLastRow = oSheet.UsedRange.Rows.Count
>
>But, what other ways are there? For example, how can you know where you stand with a ROW or COL OffSet?
>
>What other ways can you find out where you are at any moment in an Excel file when loading data to it?
Something like
oRange.Select()
and then checking the properties of excel.selection is all that comes to mind. Because in terms of Excel, question of "where am I" is answered with "you are in the cell you last clicked", and you get to feel full empathy with your mouse arrow, because that's what "I" means in this context.
In your context, I guess you may mean "where am I" in the sense "what are the coordinates of oRange". Look at oRange in the debugger - and if the debugger doesn't see its properties, try in the command window, type oRange and a dot - intellisense should know. Just try to display the properties of interested, and then the debugger will know too (yep, intellisense is smarter than the debugger in reading the typelibs).