A
A
antonio02262018-02-14 20:39:08
Visual Basic
antonio0226, 2018-02-14 20:39:08

Find smallest element of vba array?

Welcome all. Asked at the institute.
Need to find the smallest element of a 4x2 matrix

Dim A() As Single
Dim i As Integer, j As Integer
Dim max As Single

Randomize
ReDim A(1 To 4, 1 To 2)

For i = 1 To 4
   For j = 1 To 2
       A(i, j) = Int(91 * Rnd - 67)
       Label1.Caption = Label1.Caption & A(i, j) & vbTab
   Next j
   Label1.Caption = Label1.Caption & vbNewLine
Next i

So I fill in, how now to find the smallest element? I'm not friends with vba at all and I don't want to be friends.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question