SOLVED

how to use FindControl to execute the VBE Find... command

Contributor

i am trying to find the ID for the VB Editors Find... command. when i use this string, i get the Find command from excel (for searching cells). i want to execute the other Find (from VBA). how can i do that?

 

Application.CommandBars("Edit").Controls("Find...").Execute

 

i have tried to use FindControls but it doesn't return the ID from Application.VBE.Commandbars.

and below does the same thing as above

 

 

Application.CommandBars.FindControl(id:=1849).Execute

 

How can i make this work so that i get the right Find command?

1 Reply
best response confirmed by DanMcG (Contributor)
Solution
Application.VBE.CommandBars.FindControl(id:=141).Execute is the solution. had it in another forum, just found it.