Vba userform textbox validation ". If you want validation for zero-lenght strings, I would do it when the "OK" button or similar is clicked Code Private Sub TextBox1_Change () If Len (Me. I have a EXCEL VBA userform question. Value ) but it doesn't work. The Color property takes two input types: vbColor; RGB Colors; We will discuss these below: VB Color. the moon k tolnoe pdf When you double-click on the UserForm (or any of the object that you add to the UserForm ), it would open the code window for the UserForm. I forgot that in the code below you need to change the name of the textbox to the correct one Private Sub TextBox1 _Exit (ByVal Cancel As MSForms. End Sub. Code: Private Sub btnOK_Click () Dim i As Integer, aCtl As Control For i = 1 To 8 With Me. End With. how to skip through dlc 1 army Then right click the textbox , and select View Code from the context menu to open the Microsoft Visual Basic for Applications window, and then replace the original code with the following VBA code into the blank module:.