| 
    
     |  | 教えてください。 
 環境:WindowsXP Excel2000
 
 テキストファイルをオープンし、レコードを読み込み、
 動的配列に格納しているのですが、
 option Base 1 を指定しているにもかかわらず、
 デバック文で表示した結果、最小添え字が0からになっています。
 なぜ、1からにならないのでしょうか (・・?
 動的配列の場合はoption Base 1は無効なのでしょうか?(?_?)
 宜しくお願いします。)^o^(
 
 【コード】
 Option Base 1
 
 Private Sub CommandButton13_Click()
 Dim Buff   As String
 Dim WK1()  As String
 Dim WK2   As String
 Dim FileNo  As Integer
 Dim Path   As String
 Dim I    As Integer
 Dim Count  As Integer
 
 Path = "D:\A\a.txt"
 FileNo = FreeFile
 Open Path For Input As FileNo
 Do While Not EOF(FileNo)
 Line Input #FileNo, Buff
 WK1 = Split(Buff, ",")
 Loop
 Close FileNo
 
 WK2 = Join(WK1, ",")
 'デバック
 Debug.Print WK2
 For I = LBound(WK1) To UBound(WK1) Step 1
 Debug.Print I & "/" & WK1(I)
 Next
 End Sub
 
 'デバックで表示した結果、Iのカウンタ(LBound)が0から表示されます。
 (入力のテキストは、カンマ区切りで、5項目の5レコードあります。)
 
 
 |  |