Set Excel to search within entire workbook by default

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Set Excel to search within entire workbook by default

Message par ForumBot »

Set Excel to search within entire workbook by default
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Set Excel to search within entire workbook by default

Message par ForumBot »

You can do this with a Workbook_Open macro in the ThisWorkbook module, like so:

```
Private Sub Workbook_Open()

Application.CommandBars.FindControl(ID:=1849).Execute
SendKeys "%(h){DOWN}{ENTER}{ESC}"

End Sub

```

This will set it for your session for the workbook you're in.

To have this always be the default you need to create a [Personal Macro Workbook](https://www.rondebruin.nl/win/personal.htm).

Note: Old line from original answer: `SendKeys "%(t)%(h)W~{ESC}"`
Répondre

Revenir à « Excel & VBA »