salve, vorrei un piccolo ragguaglio sulle matrici ... mi servirebbe sapere come
si possono creare matrici "durante l'esecuzione" e non prima! mi spiego, date due
variabili in input (x,y) vorrei creare una matrice mat(x,y) ... è possibile?
io ho provato con il seguente code ma mi da errore:
private sub cmd1_click()
x = inputbox("")
y=inputbox("")
dim mat(x,y)
end sub
per ovviare a questo ho pensato di inserire dei cicli if ... ma ...questa volta non posso
inserire la matrice "cab" più volte, ma in diversi if, poichè mi da errore!
Private Sub Command1_Click()
If (v = 5) And (r = 3) Then
Dim cab(3, 8) As Integer
End If
If (v = 5) And (r = 2) Then
Dim cab(2, 7) As Integer
End If
If (v = 4) And (r = 3) Then
Dim cab(3, 7) As Integer
End If
If (v = 4) And (r = 2) Then
Dim cab(2, 6) As Integer
End If
If (v = 3) And (r = 3) Then
Dim cab(3, 6) As Integer
End If
If (v = 3) And (r = 2) Then
Dim cab(2, 5) As Integer
End If
End Sub![]()
![]()
![]()
![]()