Non riesco a convalidare questa espressione regolare quando chiamo la funzione:
Call TestRegExp("[A-N P-Z O-9]", "ABC")
xchè l'ambiente mi restituisce il messaggio "Errore definito dall'applicazione o dall'oggetto"
dove TestRegExp è così definita:

Function TestRegExp(myPattern As String, myString As String)
'Create objects.
Dim objRegExp As RegExp
Dim objMatch As Match
Dim colMatches As MatchCollection
Dim RetStr As String

' Create a regular expression object.
Set objRegExp = New RegExp

'Set the pattern by using the Pattern property.
objRegExp.Pattern = myPattern

' Set Case Insensitivity.
objRegExp.IgnoreCase = True

'Set global applicability.
objRegExp.Global = True

'Test whether the String can be compared.
If (objRegExp.Test(myString) = True) Then

'Get the matches.
Set colMatches = objRegExp.Execute(myString) ' Execute search.

For Each objMatch In colMatches ' Iterate Matches collection.
RetStr = RetStr & "Match found at position "
RetStr = RetStr & objMatch.FirstIndex & ". Match Value is '"
RetStr = RetStr & objMatch.value & "'." & vbCrLf
Next
Else
RetStr = "String Matching Failed"
End If
TestRegExp = RetStr
End Function

Mi chiedo...è sbagliata l'espressione "[A-N P-Z O-9]" ?...c'è un altro modo per poterla scrivere?
Se inserisco questa epressione invece [A-Z]{6,6}[A-Z 2-9]([A-Z 0-9]{3,3}){0,1} non ho alcun problema..

Thanks