Home > Back-end >  VBA Find What Default Text
VBA Find What Default Text

Time:12-01

How do you prevent Visual Basic from setting the default find (Ctrl F) text to whatever iss selected?

For clarity: In Visual Basic for Applications if you bring up a Find box it automaticaly sets the "Find What:" text to whatever you have selected in the code window. Idealy, if I closed the find box it would reopen with the find text I had last used (like every other program).

Visual Basic for Applications 7.1 Microsoft Excel 365

enter image description here

I've checked all the standard menus, there's not many and I'm not sure where else an option like that could be stored.

While this is technically in the Visual Basic for Applications on an Excel file I've also observed the behavior in the other office applications.

CodePudding user response:

Conclusions, you can't.

After looking further and feed back from others it appears you can't change the behavior of the Find What input box within Microsoft Visual Basic for Applications. However, if you're looking to repeat a search pressing F3 to Find Next while your cursor is in the code window accomplishes much of the same thing.

Thanks JohnM, I think this is as close to an answer as I'm likly to get.

  • Related