excel - Jump past special character once 2 characters entered VBA userform -


Not sure that this is possible, but there is a code that says that when you enter 2 characters So it gets stuck past: or / symbol (for a date and for a time, need to enter manually.

I feel that it is in the event of change of text box But should not be sure of the type of code to set the focus

Tell you 2 text boxes ("Time for TextBox2 , Time for TextBox2 ) Sample UserForm1 is

Enter image details here

you are continuously You can check the length of the string typed in the text box and if it is equal to 8 for the date or 4 when you manipulate the value.

  Private sub text box 1_Change ( ) String current = text as slow current Box 1. Price if lane (text box 1) = 8 then current = left (text b oaks 1, 2) & amp; "/" & Amp; Middle (text box 1, 3, 2) & amp; "/" & Amp; Correct (text box 1, 4) text box = current end if the end sub sub sub text box 2_Change () turns the string current into the current = text box 2. Value if lane (text box 2) = 4 then current = left (text box 2, 2) & amp; ":" & Amp; Right (Textbox2, 2) TextBox2 = Current End if Ending   

So now if you start UserForm1 and type 10102014 for example, then the code Automatically change this Adding a forward slash between the characters A date format

image here Enter details

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -