再請教版大,以下是小輩的程式,怎樣加入版大的程式在自己的程式中才對?謝謝!
Public i As Integer
Public m As Integer
Public n As Integer
Public B As Integer
Public S As Integer
Public check As Integer
Dim buyArray(99) As Single
Dim sellArray(99) As Single
Private Sub CommandButton1_Click()
B = 1
i = i + 1
Sheets("sheet1").Cells(i, 1) = "買"
Sheets("sheet1").Cells(i, 2) = Int((10 * Rnd) + 1)
m = m + 1
buyArray(m) = Sheets("sheet1").Cells(i, 2)
End Sub
Private Sub CommandButton2_Click()
S = 1
i = i + 1
Sheets("sheet1").Cells(i, 1) = "賣"
Sheets("sheet1").Cells(i, 2) = Int((10 * Rnd) + 1)
n = n + 1
sellArray(n) = Sheets("sheet1").Cells(i, 2)