warum mag er das hier nicht
10.02.2009 18:12:12
adrian
mal eine frage:
warum mag er das bei meinem Excel zuhause nicht und bei dem in der Firma schon =/
den Befehl "Chr(i)" fett markiert, findet er nicht.
lg
adrian
Private Sub CommandButton1_Click()
Dim i As Integer
SpecialChr = ""
With ComboBox1
For i = 33 To 47
If InStr(.Value, Chr(i)) Then SpecialChr = "Found"
Next
For i = 58 To 64
If InStr(.Value, Chr(i)) Then SpecialChr = "Found"
Next
If .Value = "" Then SpecialChr = "empty"
If SpecialChr = "Found" Then
MsgBox "Please do not enter special character like:" & " /" & " ," & " +" & " ." & " -" & _
" !" & vbNewLine & _
vbNewLine & "Please read yellow info!"
Exit Sub
End If
If SpecialChr = "empty" Then
MsgBox "Please enter value"
Else
.AddItem .Value
.Value = ""
.SetFocus
End If
End With
End Sub