Sub Initialize
Dim strValue As String
Dim ret As Variant
Dim i As Integer
Dim j As Integer
'strValue = |1,"abcdefg",100,150,120,110,300,100,100,100,500,"hijklmn",| & _
'|"192.168.0.1","00:xx:yy:zz:nn:mm","vwxyz",|
strValue=|A1,B1|
'ブログで表示しきれないので、2行に分けている
ret = Split( strValue, ",", -1, 5 )
For i = 0 To UBound(ret)
'MsgBox ret1(i), 0, CStr(i+1) & "番目のデータ"
Next
Print "'---------"
'DBに登録する製品名を設定
Dim opt1 List As String
opt1("option item 1") = "opt 1"
opt1("option item 2") = "opt 2"
opt1("option item 3") = "opt 3"
Dim opt2 List As String
opt2("option item 4") = "opt 4"
opt2("option item 5") = "opt 5"
opt2("option item 6") = "opt 6"
Dim pdt_name_to_db List As String
pdt_name_to_db("A1") = "Product1"
pdt_name_to_db("A2") = "Product2"
pdt_name_to_db("A3") = "Product3"
pdt_name_to_db("A4") = opt1("option item 1")
pdt_name_to_db("A5") = opt2("option item 5")
Print "//pdt_name_to_db"
ForAll refVar In pdt_name_to_db
Print "pdt_to_db[" & j "]" & refVar
End ForAll
'入力を確認する製品を設定
Print "//pdt_from_xls"
Dim pdt_from_xls As Variant
Dim input_able_cell As String
input_able_cell = "A1,A2,A5"
pdt_from_xls = Split(input_able_cell,",",-1,5)
For i=0 To UBound(pdt_from_xls)
Print "pdt_from_xls[" & i & "]" & pdt_from_xls(i) & "[name]" & pdt_name_to_db(pdt_from_xls(i))
Next
Print "//end"
End Sub