This example uses the Spc function to position output in a file and in the Immediate window.
' The Spc function can be used with the Print # statement.
Open "TESTFILE" For Output As #1 ' Open file for output.
Print #1, "10 spaces between here"; Spc(10); "and here."
Close #1 ' Close file.
The following statement causes the text to be printed in the Immediate window (using the Print method), preceded by 30 spaces.
Debug.Print Spc(30); "Thirty spaces later..."