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


The Space() func­tion returns a string con­sist­ing a spec­i­fied num­ber of spaces.


Space (int­Num­berOf­Spaces)

    • int­Num­berOf­Spaces
      • Manda­tory
      • Type: Numeric
      • Num­ber 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()                       |                         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...

1 Response

  1. VBA-Excel: String Func­tions – Space()” was indeed a truly excel­lent post,
    . Con­tinue writ­ing and I’ll con­tinue to keep read­ing through! Many thanks ‚Muhammad

Leave a Reply

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

%d bloggers like this: