submit then reset userform when max length is met

drc2265

Board Regular
Joined
Jul 30, 2007
Messages
96
Hello,

I currently have:

Private Sub textbox1_change()
If Len(TextBox1.Text) = 3 Then
TextBox3.SetFocus
End If
End Sub

Once max length on last textbox is reached, I would like the form to submit automatically without clicking command button, and then to reset the form with a setfocus of textbox 1.

I appreciate any help.

Thanks,
DC
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
You said:
Once max length on last textbox is reached, I would like the form to submit

What does submit mean?

And do all textboxes have a maximum length of three.

So when Textbox1 text length=3 then set focus on Textbox2 and so on and so on for each Textbox and when the Textbox14=3 Submit. Is that what you want?

And again. What does Submit mean?

And your subject title says:

then reset userform

What does reset mean?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,575
Messages
6,125,619
Members
449,240
Latest member
lynnfromHGT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top