VBA: 住所を50バイト毎に区切って3つの配列へ格納する。

Public Function getArrSplitLenB(istr$, arr_cnt As Long, ilen As Long) As Variant
    ReDim ret(arr_cnt - 1)

    ret(0) = LeftA(istr$, ilen) 'ariawase function
    Dim i%, wstr$:
    wstr$ = istr
    For i = 1 To arr_cnt - 1
        wstr$ = Replace(wstr$, ret(i - 1), "", , 1)
        ret(i) = LeftA(wstr$, ilen)
    Next i

    getArrSplitLenB = ret
End Function

▼使い方

    Dim jusyoArr: jusyoArr = getArrSplitLenB(wjyu$, 3, 50)
    
    rs!住所1 = jusyoArr(0)
    rs!住所2 = jusyoArr(1)
    rs!住所3 = jusyoArr(2)

/* -----codeの行番号----- */