Private Sub Form_Activate ()
Print "Visual"; Space (10); "Basic"
End Sub
means that the words Visual and Basic will be separated by 10 spaces.
The example here compute a multiplication table using the Space
function. The output is shown in the diagram on the right. Notice that the
alignments of the columns are totally off. Therefore, it is normally better
touse the Tab function rather than the Spaces function if we want a uniform
display ofthe items in a table.
Private Sub Form_Activate ()
For x = 1 To 10
Print "2" & "x" & Str(x) & "=" & Space (2); Str(2 * x) _
; Space (6); "3" & "x" & Str(x) & "=" & Space (2); Str (3 * x) _
; Space (6); "4" & "x" & Str(x) & "=" & Space (2); Str (4 * x) _
; Space (6); "5" & "x" & Str(x) & "=" & Space (2); Str(5 * x) _
; Space (6); "6" & "x" & Str(x) & "=" & Space (2); Str(6 * x) _
; Space (6); "7" & "x" & Str(x) & "=" & Space (2); Str(7 * x) _
; Space (6); "8" & "x" & Str(x) & "=" & Space (2); Str(8 * x) _

; Space (6); "9" & "x" & Str(x) & "=" & Space (2); Str(9 * x) _
; Space (6); "10" & "x" & Str(x) & "=" & Space (2); Str(10 * x) _
Next x
End Sub