What is the syntax to return string a certain number of times?

String(number, character)
‘number – number of times value will be returned; mandatory parameter
‘character – character value that will be repeated; mandatory parameter
‘examples
Dim name As String
name = "Steve Musk!"
MsgBox (String(1, "S")) 'S
MsgBox (String(20, "!")) '!!!!!!!!!!!!!!!!!!!!
MsgBox (String(5, "M")) 'MMMMM

 

Advertisements