VBA-Excel: String Functions – Space()


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


Space (intNumberOfSpaces)

    • 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





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 *

Show Buttons
Hide Buttons
%d bloggers like this: