potresti farti una funzione che verifica se cè un errore usando ubound:
:metallicacodice:Public Function IsValidArray(arr As Variant) As Boolean On Error GoTo Erro Dim i As Integer i = UBound(arr) IsValidArray = True Exit Function Erro: IsValidArray = False End Function ... dim arr() as String ... if not IsValidArray(arr) then msgbox "Array non ancora creato" ... endif ...

Rispondi quotando