主题:求救!!!!
一组txt数据
2,0.2,0.486947462
3,0.4,0.788222869
4,0.6,1.113382153
5,0.8,1.468312064
6,1,1.841470985
7,1.2,2.213892018
8,1.4,2.562845579
9,1.6,2.864228829
读取的话第一列在combo1下拉菜单中保存(图中i值),第二列在combo2下拉菜单中保存(图中x值),以此类推
Private Sub Command1_Click()
Dim a As String
Dim b As String
Dim c As String
Dim s As Integer
Open "c:\111data.txt " For Input As #1
Do While Not EOF(1)
Line Input #1, rrrr
s = InStr(rrrr, ",")
a = a & Left(rrrr, 1) & vbCrLf
b = b & Mid(rrrr, 3, 3) & vbCrLf
c = c & Mid(rrrr, 7, 30) & vbCrLf
Loop
Close #1
Combo1.AddItem a
Combo2.AddItem b
Combo3.AddItem c
End Sub
这是我写的有很大的问题“,”不能消除,而且所有的数据都挤在下拉菜单的一行里面;根本不分行;我是菜菜鸟,麻烦好心人予以修改指点,拜托了。
2,0.2,0.486947462
3,0.4,0.788222869
4,0.6,1.113382153
5,0.8,1.468312064
6,1,1.841470985
7,1.2,2.213892018
8,1.4,2.562845579
9,1.6,2.864228829
读取的话第一列在combo1下拉菜单中保存(图中i值),第二列在combo2下拉菜单中保存(图中x值),以此类推
Private Sub Command1_Click()
Dim a As String
Dim b As String
Dim c As String
Dim s As Integer
Open "c:\111data.txt " For Input As #1
Do While Not EOF(1)
Line Input #1, rrrr
s = InStr(rrrr, ",")
a = a & Left(rrrr, 1) & vbCrLf
b = b & Mid(rrrr, 3, 3) & vbCrLf
c = c & Mid(rrrr, 7, 30) & vbCrLf
Loop
Close #1
Combo1.AddItem a
Combo2.AddItem b
Combo3.AddItem c
End Sub
这是我写的有很大的问题“,”不能消除,而且所有的数据都挤在下拉菜单的一行里面;根本不分行;我是菜菜鸟,麻烦好心人予以修改指点,拜托了。