Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start VBA macro when editing a cell

Tags:

excel

vba

I simply try to write a search macro in an excel sheet. How can I start a macro dynamically DURING editing a cell. When writing in a cell the search macro should run in the background with every character added or deleted not just at the end. Worksheet_Change(ByVal Target As Range) only starts when editing is finished (return was hit or other cell was selected).

Thanks.

like image 993
JFS Avatar asked Jan 10 '23 11:01

JFS


1 Answers

You can't. The code engine won't run while Excel is in Edit mode. You have to have the user enter the text in something other than a cell - like a control on the worksheet or a control on a userform.

like image 124
Dick Kusleika Avatar answered Jan 17 '23 21:01

Dick Kusleika