- VB,VBA
- 2009-01-31 - 更新:2012-12-03
この記事は最終更新日から1年以上経過しています。
Private Function array_push(source As Variant, destination As String, flag As Boolean) As String Dim Ary() As String Dim delimiter As String Select Case (flag) Case True '選択地域文字列 delimiter = " " Case False '選択地域 delimiter = ":" End Select If InStr(source, destination) < 0 Then array_push = source Exit Function End If If Not IsNull(source) Then Ary = Split(source, delimiter) ReDim Preserve Ary(UBound(Ary) + 1) As String Ary(UBound(Ary)) = destination array_push = Join(Ary, delimiter) array_push = value_splice(array_push, ":") DoEvents array_push = repRecur(array_push, ":") Else array_push = destination End If End Function