Find After:= Activecell not working

jblevins

Active Member
Joined
Sep 2, 2013
Messages
250
Office Version
  1. 2003 or older
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
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
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?
 
Upvote 0
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:
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,611
Messages
6,120,513
Members
448,967
Latest member
screechyboy79

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
Back
Top