VBA: tabbing issue

LANGAZOU Posted messages 100 Status Member -  
LANGAZOU Posted messages 100 Status Member -
Hello,

I am a beginner in VBA, and I created a USERFORM with several text boxes (only numeric values). The problem is that sometimes when I type numeric values and press tab, the set focus does not move to the next text box, and it starts moving within the same initial text box instead of moving to the next one, even though the tab order is respected. When this issue occurs, the text box allows me to type letters, and the thousands separator becomes non-functional!

I don't know where this problem comes from and why the tabulation does not work sometimes and not all the time.

Thank you for your valuable help.

2 answers

ThauTheme Posted messages 1564 Status Member 160
 
In principle, tabbing inside a TexBox is done with the key combination [Ctrl]+[TAB]! Have you checked the [TabStop] property (normally =True) of your textboxes? Also check the [Locked] and/or [Enabled] properties...
Without the right file, it's impossible to help you further! ...

--
See you,
ThauTheme
1
LANGAZOU Posted messages 100 Status Member
 
Hello,

Thank you for your response.
The properties you mentioned have been verified (Tab stop=true; Locked=false).
Attached is my file:
https://www.cjoint.com/?3BAiCsfKKrj

Thank you.
0
ThauTheme Posted messages 1564 Status Member 160
 
Hello Langazou, hello the forum,

I didn't encounter any particular difficulties with the [Tab] key in your Userform. The phenomenon you describe hasn't happened to me. I still found the TextBox1.KeyPress code quite unusual...

--
See you later,
ThauTheme
0
LANGAZOU Posted messages 100 Status Member
 
I knew that the phenomenon is not verifiable because it is present in 10% of cases.
Thank you for your intervention.
0