Using Concatenation to build a string

Sometimes we will need to build a string from several pieces. We can apply the accumulator pattern to building strings.

 

Private Sub btnCount_Click()
        Static intCount As Integer

        intCount = intCount + 1
        lblCounting.Text &= “ “ & intCount
End Sub

 

 
The pattern for the statement used to build a string over a series of steps is
 
A = A & “ “ & B (where A is the string variable and B contains the string you want to add.)