Find After:= Activecell not working

jblevins

Board Regular
Joined
Sep 2, 2013
Messages
192
I had to replace "Activecell" with the code below, will someone please tell me why it didn't work and kept returning to the same row?

Code:
    With Workbooks(wbName).Sheets("Contacts")
        .Activate
        .Columns("A:BC").Find(What:=frmData.txtFindText.Value, After:=[B].Cells(ActiveCell.Row + 1, 1)[/B], LookIn:=xlFormulas, LookAt _
            :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False).Activate
    End With
 

Some videos you may like

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Jerry Sullivan

MrExcel MVP
Joined
Mar 18, 2010
Messages
8,787
When it wasn't working, what was your activecell's address, what is the row of the first match you were trying to find, and what was the row that it found instead?
 

jblevins

Board Regular
Joined
Sep 2, 2013
Messages
192
When it wasn't working, what was your activecell's address, what is the row of the first match you were trying to find, and what was the row that it found instead?
I have two rows that contain the same searched data. It stayed in the same cell until the search was activated twice and then it would move. If I change the search data, it would find it immediately and worked fine as long as there was only one row with the data. After changing the "After" it works fine.
 
Last edited:

Jerry Sullivan

MrExcel MVP
Joined
Mar 18, 2010
Messages
8,787
I can't tell whether you still have the Original question of why it didn't work with ActiveCell.
 

jblevins

Board Regular
Joined
Sep 2, 2013
Messages
192
I can't tell whether you still have the Original question of why it didn't work with ActiveCell.
I have the issue fixed, but I do not know why I have the problem and that is the issue. I thought that if "After:=Activecell" was entered it would jump to the row following the current row.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,694
Messages
5,597,571
Members
414,156
Latest member
WDMix

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top