Getting row number variable from a selected row in Excel 
Author Message
 Getting row number variable from a selected row in Excel

If you've managed to select the row you want using the range object is there
a way to set a variable to the number of the row you've selected?  I can get
the find a row and I can manipulate a row, but I can't manipulate the row I
find.

Thanks in advance.
Rebecca



Tue, 16 Mar 2004 05:12:58 GMT  
 Getting row number variable from a selected row in Excel
Try:

myRowNum = Selection.Row

but, if you're using a range object to select the row, why not just
refer to the range object's row property directly:

myRowNum = myRange.Row

Or, if you're manipulating an entire row:

   myRange.EntireRow.Interior.Color = vbRed



Quote:
> If you've managed to select the row you want using the range object is there
> a way to set a variable to the number of the row you've selected?  I can get
> the find a row and I can manipulate a row, but I can't manipulate the row I
> find.

> Thanks in advance.
> Rebecca

--

ROT13 encoding, decode for real mail


Tue, 16 Mar 2004 05:27:56 GMT  
 Getting row number variable from a selected row in Excel
Thank you, I just knew it I was going to want to slap my head when I found
out the answer, and sure enough...

On 9/27/01 5:27 PM, in article

Quote:

> Try:

> myRowNum = Selection.Row

> but, if you're using a range object to select the row, why not just
> refer to the range object's row property directly:

> myRowNum = myRange.Row

> Or, if you're manipulating an entire row:

>  myRange.EntireRow.Interior.Color = vbRed



>> If you've managed to select the row you want using the range object is there
>> a way to set a variable to the number of the row you've selected?  I can get
>> the find a row and I can manipulate a row, but I can't manipulate the row I
>> find.

>> Thanks in advance.
>> Rebecca



Wed, 17 Mar 2004 03:10:34 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to display the row number of each row in cross-tab

2. Getting Text from Table Causes Problems with the Row Number

3. select number of rows

4. Selecting multiple rows using variables

5. Getting Selected row from a datagrid

6. Getting a Selected Row of an MSFlexGrid

7. Getting a Selected Row of an MSFlexGrid

8. Getting cell info from row selected in DBGrid...

9. Getting the first row from a select

10. Getting a Selected Row of an MSFlexGrid

11. rows's number in Excel

12. excel vba - help finding designated text within string and deleting selected range's row

 

 
Powered by phpBB® Forum Software