Randomize
a = Round( CCur(60 * Rnd + 260),1)
d = a*10 mod 10
If d = 0 Then
a = cstr(a) &".0"
End If
b = Round( CCur(10 * Rnd + 80),1)
d = b*10 mod 10
b = cstr(b) &".0"
c = Round(CCur(2 * Rnd + 3), 2)
d = c*100 mod 100
c = cstr(c) & ".00"
Else
d = c*100 mod 10
c = cstr(c) & "0"
MessageBox a&"|"&b&"|"&c
//給你做了一些調整,輸出部分你自己編輯下吧
Randomize
a = Round( CCur(60 * Rnd + 260),1)
d = a*10 mod 10
If d = 0 Then
a = cstr(a) &".0"
End If
Randomize
b = Round( CCur(10 * Rnd + 80),1)
d = b*10 mod 10
If d = 0 Then
b = cstr(b) &".0"
End If
Randomize
c = Round(CCur(2 * Rnd + 3), 2)
d = c*100 mod 100
If d = 0 Then
c = cstr(c) & ".00"
Else
d = c*100 mod 10
If d = 0 Then
c = cstr(c) & "0"
End If
End If
MessageBox a&"|"&b&"|"&c
//給你做了一些調整,輸出部分你自己編輯下吧