O'Reilly logo

VB.NET Language in a Nutshell, Second Edition by Steven Roman PhD, Paul Lomax, Ron Petrusha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Space Function

Class

Microsoft.VisualBasic.Strings

Syntax

Space(number)
number (required; Integer)

An expression evaluating to the number of spaces required

Return Value

A String containing number spaces

Description

Creates a string containing number spaces

Rules at a Glance

While number can be zero (in which case the function returns the empty string), runtime error 5, “Invalid procedure call or argument,” is generated if number is negative.

Programming Tips and Gotchas

The Space function is most useful for creating a string buffer, an area where an external function can write data to be returned to the calling program.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required