ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

½Ð°Ý¤°»ò¦a¤è¿ù¤F

½Ð°Ý¤°»ò¦a¤è¿ù¤F

Public i As Integer
Public m As Integer
Public n As Integer
Public B As Integer
Public S 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) = "¶R"
        Sheets("sheet1").Cells(i, 2) = Int((10 * Rnd) + 1)
m = m + 1
buyArray(m) = Sheets("sheet1").Cells(i, 2)
If B = S Then
    If m > n Then
    Sheets("sheet1").Cells(i, 3) = sellArray(n) - buyArray(n)
    S = 0
    Else
    Sheets("sheet1").Cells(i, 3) = sellArray(m) - buyArray(m)
    B = 0
    End If
   
End If


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)
If S = B Then
    If n > m Then
    Sheets("sheet1").Cells(i, 3) = sellArray(m) - buyArray(m)
    B = 0
    Else
    Sheets("sheet1").Cells(i, 3) = sellArray(n) - buyArray(n)
    S = 0
    End If
   
End If
End Sub

¦]¬°¤§«e5¦¸"¶R"+5¦¸"½æ"¡A¤w¸g¨S¦³­Ü¡A¤§«áªº1­Ó¶R½æ¬O¤£À³­p¥X²{·l¯q
¥~¦æ¤H§¹¥þ¤£À´§A¦b»¡¤°»ò¡C

TOP

·Q¤F¥b¤Ñ¡AÁÙ¬O¨Sªk¤l!·Ð½Ð¤j¤jÀ°§U«ü¥¿¡A¸U¤À·PÁÂ!

TOP

³o»ò»¡¤£¬O¶Ã¼Æ­«Å|ªº°ÝÃD¤F¡C
·l¯qªº°ÝÃD§Ú¤£À´¡C
oobird µoªí©ó 2010-9-28 00:46



    ¦AÁÂÁª©¤jªº«ü¾É!

TOP

³o»ò»¡¤£¬O¶Ã¼Æ­«Å|ªº°ÝÃD¤F¡C
·l¯qªº°ÝÃD§Ú¤£À´¡C

TOP

¨â¬q³£­n¥[ªº¡C
oobird µoªí©ó 2010-9-28 00:23



  ¨â¬q³£¥[¤F¡A°ÝÃDÁÙ¦b(¬õ¦â³¡¤À) ¡A¦]¬°¤§«e5¦¸"¶R"+5¦¸"½æ"¡A¤w¸g¨S¦³­Ü¡A¤§«áªº1­Ó¶R½æ¬O¤£À³­p¥X²{·l¯q!
¶R        5       
¶R        7       
½æ        1        -4
½æ        7        0
½æ        3       
½æ        10       
¶R        1        2
¶R        10        0
¶R        9       
½æ        3        -6
¶R        7        -6
¶R        8       
½æ        2        -5
¶R        10       
½æ        2        -6
½æ        9        -1
¶R        1        -1
½æ        10        9

TOP

¥»©«³Ì«á¥Ñ oobird ©ó 2010-9-28 00:25 ½s¿è
¦^´_  oobird


    ÁÂÁª©¤j!¦ý°ÝÃDÁÙ¦b³á!
cdkee µoªí©ó 2010-9-27 23:55



    ¨â¬q³£­n¥[ªº¡C
­YÁÙ¤£¬O§A­nªº¡A¨º´N¯u¬O¬Ý¤£¥X¨Ó§A°Ý¤°»ò¤F¡I

TOP

¦^´_ 10# oobird


    ÁÂÁª©¤j!¦ý°ÝÃDÁÙ¦b³á!

TOP

Sheets("sheet1").Cells(i, 1) = "¶R"
Randomize
        Sheets("sheet1").Cells(i, 2) = Int((10 * Rnd) + 1)

TOP

¬Ý¤£¥X¨Ó§Aªº·l¯qÃB¬O¤°»ò¡A¤£¹L·Pı§A¶·­n¦b²£¥Í¶Ã¼Æ«e¥[¤WRandomize
oobird µoªí©ó 2010-9-27 22:56


·l¯qÃB«ü¤@¶R¤@½æ«áªº·l¯q.
"­n¦b²£¥Í¶Ã¼Æ«e¥[¤WRandomize"---ª©¤j¥i§_¦³¨Ò¤l¦A»¡©ú?ÁÂÁÂ!

TOP

        ÀR«ä¦Û¦b : ¦Y­W¤F­W¡B­WºÉ¤Ü¨Ó¡A¨ÉºÖ¤FºÖ¡BºÖºÉ´d¨Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD