新人求帮助!Array()函数问题
config.ini文件内容[Form2]
CaiLiao="默认", "焊接件", "装配件", "45", "Q235A", "65Mn", "40Cr", "ZQA19-4", "ZQSn10-1", "QT600-3", "HT300"
程序如下 想在comcobox中下拉列表中显示
Dim F As String, nStr As String, nSize As Long, S As Long
F = App.Path & "\config.ini"
nSize = 255: nStr = String(nSize, 0)
d = GetPrivateProfileString("Form2", "CaiLiao", vbNullString, nStr, nSize, F)
S = InStr(nStr, Chr(0))
If S > 0 Then
nStr = Left(nStr, S)
End If
Dim c As Variant
Dim i As Integer
c = Array(nStr)
For i = 0 To UBound(c)
Combo2.AddItem c(i)
Next
其结果是内容没有分开,求说明错误原因。
[此贴子已经被作者于2016-9-28 15:59编辑过]