Show Buttons
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkdin
Share On Reddit
Contact us
Hide Buttons

VBA-Excel: String Functions – String()


 The String() func­tion returns a string con­sist­ing a repeat­ing char­ac­ters of spec­i­fied length.



  • num­ber
    • Manda­tory
    • Type: Numeric
    • No of times the char­ac­ter to be repeated, means length of the returned string.

  • Char­ac­ter
    • Manda­tory
    • Type: Numeric
    • Char­ac­ter to be repeated
Function FnString()

  intNumber = 10

  strChar = "S"

  MsgBox String(intNumber, strChar)

End Function     


Also Read About  Other String() Functions

INSTR()                       |                         Instr­REV()                       |                        LCase()

UCase()                      |                         Left()                                |                        Right()

LTrim()                        |                         Mid()                                 |                        Trim()

RTrim()                       |                        Replace()                          |                        Space()

Len()                           |                        Str­Comp()                         |                        String()


Happy Macro­ing :)

Sumit Jain

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: