VBA - Press button of find all inside find dialog box

Veloxy

New Member
Joined
Sep 23, 2021
Messages
7
Office Version
  1. 2013
Platform
  1. Windows
Hello guys, firstly i want to sorry my English, because i'm not using the translator. I hope you can understand what I writed.

So, i maked a macro that open the find dialog box and search for the word "lote".

My macro:

Range("A1").Activate

SendKeys "^lLOTE"
Range("A1").Activate
SendKeys ("{TAB}{TAB}{NUMLOCK}{ENTER}")

This code works as i want, but I trying to stop use sendkeys. I researched a better alternative to make the same function and found this way:

Set Find = Cells.Find("Lote", LookIn:=xlValues, lookat:=xlPart)
Application.CommandBars.FindControl(ID:=1849).Execute

It open the find dialog box and put the word, but i still need to press button of find all (circled in red in the image), I want that code press automatically, is there any way to do this?

1632421516119.png
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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