有5行数据,怎么用vb编写把5行都共有的数提出来

来源:百度知道 编辑:UC知道 时间:2024/06/04 05:51:49
text1中有5行数据 双色球
01 05 13 28 31 32 33
01 05 21 25 28 31 32
01 02 05 15 19 20 27
01 05 13 17 18 22 32
01 05 08 13 20 22 29
点conmd1把5行都共有的数提出来放入text2中
这次结果有 01 05
请高手帮帮忙编写,小弟太业余了

private sub command1_click()
dim i as integer,R(4) as string,K as string,S as string
open "c:\1.txt" for input as #1
line input #1,R(0)
line input #1,R(1)
line input #1,R(2)
line input #1,R(3)
line input #1,R(4)
for i=1 to 33
K=format(tirm(str(i)),"00")
if instr(R(0),K)<>0 and instr(R(1),K)<>0 and instr(R(2),K)<>0 and instr(R(3),K)<>0 and instr(R(4),K)<>0 then
S=S+K+space(1)
end if
next i
text2.text=s
end sub