VBA Macro to open Find box and search multiple worksheets

Sifuevs

New Member
Joined
May 8, 2015
Messages
25
Office Version
  1. 365
Platform
  1. Windows
Hi all,
great to be here in the community ad thanks for having me.
I am basically wanting some VBA code that can be used as a macro to open a find box, then input either a partial text or partial number. This in turn then searches specific worksheets (example worksheets: MON01, MON02) of which I have a lot, and then returns the results and what worksheet they are on.
I am by no way an advanced Excel individual so thank you in advance for your assistance and patience.

Thank you
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
There Is no way to do this through VBA,

The best thing you can do is open the dialogue to the option to select.
Code:
Sub ShowFind(MyValue)
    ActiveSheet.Cells.Find What:=MyValue, LookAt:=xlpart
    Application.CommandBars("Worksheet Menu Bar").FindControl( _
      ID:=1849, recursive:=True).Execute
End Sub

and then have your code feed the Myvalue from somewhere

Code:
sub MySub

dim str_Value as string

str_Value = "Myval"

call Showfind(str_Value)

end sub

The person would then need to pull down "Workbooks" from the options menu, then click on find all
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,891
Messages
6,175,229
Members
452,621
Latest member
Laura_PinksBTHFT

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