Microsoft Excel - VBA or Excel settings for Auto Enter on nth typed character

Asked By Gauss on 01-Jun-15 09:02 AM
Hi,
In MS excel cell am typing 42347, instead of manually pressing Enter Key I want a macro to do the Enter once the nth say 5th character is typed.


thank you for your inputs.
Harry Boughen replied to Gauss on 01-Jun-15 06:46 PM
Hello Gauss,

I am pretty sure that what you are asking for is not possible as, when you are entering data, Excel is in Edit mode and VBA is inactive.  You would need some sort of event to activate VBA and keystrokes in edit mode do not count as events.

There is the Application.Onkey Method which will detect certain keys on the keyboard but there is no facility for 'normal' alphanumerics.

Regards

Harry