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 – Space()

Description: 

The Space() function returns a string consisting a specified number of spaces.

Format:

Space (intNumberOfSpaces)

Arguments:
    • intNumberOfSpaces
      • Mandatory
      • Type: Numeric
      • Number of spaces you want in the string.

 

Function FnSpace()

   intNos = 25

   MsgBox "Perfect example of" & Space(intNos) & "Space"

End Function

 

Space()

Space()

 

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...

1 Response

  1. “VBA-Excel: String Functions – Space()” was indeed a truly excellent post,
    . Continue writing and I’ll continue to keep reading through! Many thanks ,Muhammad

Leave a Reply

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

%d bloggers like this: