OzGrid

How to create VBA to bring up the find/replace box

< Back to Search results

 Category: [Excel]  Demo Available 

How to create VBA to bring up the find/replace box

 

Requirement:

 

The user has some code which brings up the find/replace box but it brings up the replace rather than the find. Is there a way to bring up the find tab?

Here is the code:

Code:
Sub TTC_Find()
'
' TTC_Find Macro

Application.ScreenUpdating = True


Application.CommandBars.FindControl(ID:=313).Execute
'
  
End Sub

 

https://www.ozgrid.com/forum/forum/help-forums/excel-vba-macros/149614-vba-find-replace-change-tab

 

Solution:

 

Skywriter uses Excel 2010 and this worked for Skywriter:

Code:
Application.CommandBars.FindControl(ID:=1849).Execute

 

Obtained from the OzGrid Help Forum.

Solution provided by skywriter.

 

See also: Index to Excel VBA Code and Index to Excel Freebies and Lesson 1 - Excel Fundamentals and Index to how to… providing a range of solutions and Index to new resources and reference sheets

 

See also:

How to make all empty textboxes invisible
How to hide and unhide with checkboxes - multiple checkboxes do multiple different things
How to prevent listbox horizontal scrollbar
How to use the namebox shortcut key

 

Click here to visit our Free 24/7 Excel/VBA Help Forum where there are thousands of posts you can get information from, or you can join the Forum and post your own questions.


Gallery



stars (0 Reviews)