Funzione Space

Restituisce una stringa costituita da un numero specificato di spazi.

Sintassi

Space(number)

Note

L'argomento (number) è il numero di spazi desiderato nella stringa.

Nell'esempio seguente viene utilizzata la funzione Space per restituire una stringa costituita da un numero specificato di spazi.

Esempio

Dim MyString
MyString = Space (10)   ' Returns a string with 10 spaces.
MyString = "Hello" & Space (10) & "World" 
' Insert 10 spaces between two strings.
MyString = "Name:" & Space (5) & "John Doe"   
' Adds 5 spaces between "Name:" and "John Doe"
MyString = "Start" & Space (0) & "End"   
' No spaces added between "Start" and "End"