| 发表于:2008-01-17 14:41:47 楼主 |
下面一段是写入一个数另起一行,如果我想每10个数一行呢 例如:1,2,3,4,5,6,7,8,9,10 11,........... 这样 private sub command1_click() dim str as string command1.visible = false randomize timer str = "" open "c:\vb.txt" for output as #1 while j < 10 q = int(rnd(1) * 369 + 1) label1.caption = q: doevents if n(q) = 0 and bstop = true then str = str & q & chr(13) & chr(10) n(q) = 1 j = j + 1 bstop = false end if wend if str <> "" then print #1, str end if close #1 end sub |
|
|
|
|