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() function returns a string consisting a repeating characters of specified length.



  • number
    • Mandatory
    • Type: Numeric
    • No of times the character to be repeated, means length of the returned string.

  • Character
    • Mandatory
    • Type: Numeric
    • Character to be repeated
Function FnString()

  intNumber = 10

  strChar = "S"

  MsgBox String(intNumber, strChar)

End Function     


Also Read About  Other String() Functions

INSTR()                       |                         InstrREV()                       |                        LCase()

UCase()                      |                         Left()                                |                        Right()

LTrim()                        |                         Mid()                                 |                        Trim()

RTrim()                       |                        Replace()                          |                        Space()

Len()                           |                        StrComp()                         |                        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: