
arr = Array("/", "*", "?") 'inserisci i simboli
tex = InputBox("Scrivi: ")
For Each sim In arr
If InStr(1, tex, sim) > 0 Then
MsgBox "È presente: " & sim
Exit Sub
End If
Next |
tex = InputBox("Scrivi: ")
For Each sim In Array(":","/","","|", "*","""", "?")
If InStr(1, tex, sim) > 0 Then
MsgBox "È presente: " & sim
Exit Sub
End If
Next |
L1:
Istruttore = InputBox("Inserire COGNOME istruttore", "INSERIRE", trovato)
trovato = ""
For Each sim In Array(":", "/", "", "|", "*", """", "?", "<", ">", ":", ",", "?", "!", "£", "$", "%", "&", "(", ")", "=", "'", "^", ";", "-", "_")
If InStr(1, Istruttore, sim) > 0 Then
errore = MsgBox("Non è possibile inserire simboli... hai inserito: " & sim, vbOKOnly, "Errore")
trovato = Istruttore
Exit For
End If
Next
If trovato <> "" Then GoTo L1
|
Do
istruttore = InputBox("Inserire COGNOME istruttore", "INSERIRE", trovato)
ok = True
If istruttore <> "" Then
For Each sim In Array(":", "/", "", "|", "*", """", "?", "<", ">", ":", ",", "?", "!", "£", "$", "%", "&", "(", ")", "=", "'", "^", ";", "-", "_")
If InStr(1, istruttore, sim) > 0 Then
MsgBox "E' stato inserito un carattere non consentito: " & sim, , "Errore"
ok = False
Exit For
End If
Next
End If
Loop Until ok
|
