Oscar,
Are you saying that you are writing code in
VB (not VBA) and that you have an object variable referring to an active Excel workbook
(say oxlWkb)? If so, one way to refer to the current selection is:
oxlWkb.Application.Selection
--
John Green - Excel MVP
Sydney
Australia
"Oscar" wrote in message .nl...
In a VB application, I am referencing an Excel workbook. I need to know the
row number of the toprow and bottomrow of any range selection. Therefore I
want to use the selection object. However, the 'selection' object is not
available for the Excel.worksheet method and is only available for the
Excel.application and it doesn't show any method after selection. For
example I can't use selection.rows. How can I change this ?
Oscar