A recent article (yesterday?) described a VB program to replicate a pattern of characters into a string. Below is a “sub” version of the same program that uses recursion to run in fewer iterations on large strings.
Public Sub FillString( _
ByVal Value As String, _
ByVal StringLength As Integer, _
ByRef Result As String)
Result = Result & Value
Do While Len(Result) < StringLength
FillString Value & Value, StringLength, Result
Loop
Result = Left(Result, StringLength)
End Sub