Select row 
Author Message
 Select row

How come when I record a macro to find a string in row 1 Excel records
this.

    Rows("1:1").Select
    Selection.Find(What:="SEQ", After:=ActiveCell, LookIn:=xlFormulas, _

        LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
_
        MatchCase:=False).Activate

But in my code I need to use :

    Rows("0").Select

In my code if I use "1:1" it selects row 2

Thanks



Wed, 18 Jun 1902 08:00:00 GMT  
 Select row
If your code incorporates an array, you will get the results you are getting
because the first element in an array is 0.

tod


Quote:
> How come when I record a macro to find a string in row 1 Excel records
> this.

>     Rows("1:1").Select
>     Selection.Find(What:="SEQ", After:=ActiveCell, LookIn:=xlFormulas, _

>         LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
> _
>         MatchCase:=False).Activate

> But in my code I need to use :

>     Rows("0").Select

> In my code if I use "1:1" it selects row 2

> Thanks



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. selecting row after row

2. Macro VB code for selecting row X to Next-to-last row for Pivot Table

3. Getting row number variable from a selected row in Excel

4. listBox: how to get the selected row - it's not a mulit-select-listBox

5. Selecting Rows with Variables

6. Selecting Rows

7. selecting rows based on same data in a column

8. Deleting user Selected Rows Issue

9. Deleting Selected Rows

10. Automaric color selected row


 
Powered by phpBB® Forum Software © phpBB Group