Excellists,
I've constructed a userform te perform a textsearch for some keywords. I want to check the textbox input for Ucase. I can do that one by one as follows:
As there are 8 boxes i would like to do it dynamiccaly. But my effords fail. See coding below. Where do i go wrong?
Is it me or is it not possible to upload examplefile???
Regards,
Luc
I've constructed a userform te perform a textsearch for some keywords. I want to check the textbox input for Ucase. I can do that one by one as follows:
Code:
Private Sub TextBox1_Change()
'If TextBox1.Text <> LCase(TextBox1.Text) Then
'MsgBox "Geen hoofdletters!!"
'TextBox1 = ""
'TextBox1.SetFocus
'End If
End Sub
As there are 8 boxes i would like to do it dynamiccaly. But my effords fail. See coding below. Where do i go wrong?
Code:
Private Sub InputTextBox_change()
Dim x As Integer
For x = 1 To 8
If Me.Controls("textbox" & x) = UCase("textbox" & x) Then
MsgBox "Geen hoofdletters!!"
Me.Controls("textbox" & x).Value = ""
End If
Next x
End Sub
Is it me or is it not possible to upload examplefile???
Regards,
Luc