Hi there

I would like VB6 procedure to execute the TAB key as soon as the maximum length data is entered on the text box without having to press the TAB key.

Text box has a maximum length of 5 characters. What code do I use to automatically move the cursor to the next box as soon as the 5 characters are typed?

Would be grateful for your advice.

Thanks
Drew

you need to code the text_change event of the textbox.
and calculate the length.
once length reaches the desired length set focus on to the next control.

I do believe there is a command (len?) to get the length of a string in vb6

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.