VBA Assigning strings with repeated characters Use the String function to assign a string with n repeated characters


Example

Dim lineOfHyphens As String
'Assign a string with 80 repeated hyphens
lineOfHyphens = String$(80, "-")