Space, Space$ Functions |
No
Space(number)
number
Use: Required
Data Type: Integer
An expression evaluating to the number of spaces required.
A Variant of subtype String containing number spaces (in the case of Space) or a String containing number spaces (in the case of Space$).
Creates a string containing number spaces.
While number can be zero (in which case the function returns a null string), runtime error 5, "Invalid procedure call or argument," is generated if number is negative.
You can use the Space function to both pad and clear data stored in fixed-length strings. For example, the following code fragment fills a fixed-length string with spaces:
Dim strFixed As String * 32 ... strFixed = Space(Len(strFixed))