Be the first user to complete this post

  • 0
Add to List

VBA-Excel: String Functions – String()

Description:

 The String() function returns a string consisting a repeating characters of specified length.

Format:

String(number,character)

Arguments:
  • 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     
String()
String()

Also Read About  Other String() Functions

INSTR()                       |                         InstrREV()                       |                        LCase()

UCase()                      |                         Left()                                |                        Right()

LTrim()                        |                         Mid()                                 |                        Trim()

RTrim()                       |                        Replace()                          |                        Space()

Len()                           |                        StrComp()                         |                        String()



Also Read:

  1. VBA-Excel: String Functions – strComp()
  2. VBA-Excel: Date-Time Functions – CDate()
  3. Excel-VBA : Range - Lock/Unlock Specific Cells
  4. VBA-Excel: Create Array using Array() Function
  5. VBA-Excel: String Functions – RTrim()
  6. VBA-Excel: Date-Time Functions – DateValue()
  7. VBA-Excel: Date-Time Functions – IsDate()
  8. VBA-Excel: Get all the WeekDays or Working days in Specified Date Range, (excluding Satudays and Sundays)