Código:
Gracias por las respuestas.Option Explicit
Dim Matriz() As String
Private Sub Command1_Click()
MsgBox IIf(UBound(Matriz) = 2, Matriz(2), "No hay datos")
End Sub
Private Sub Command2_Click()
If UBound(Matriz) = 2 Then
MsgBox Matriz(2)
Else
MsgBox "No hay datos"
End If
End Sub
Private Sub Form_Load()
Matriz = Split("Dato 1-Dato 2", "-")
End Sub
Javier

