Displaying question

W

WLMPilot

If memory serves me right, I seem to remember a command in the BASIC language
that allowed for x number of spaces, say SPC(x). "X" would be caculated
taking the length of the longest line and adjusting it for each short line as
it was displayed. Something like this was used to help line up lines that
were displayed with each line being different in length.

Is there a function or command that can do this in VBA?

Thanks,
Les
 
J

James

Dim MyString
' Returns a string with 10 spaces.
MyString = Space(10)

' Insert 10 spaces between two strings.
MyString = "Hello" & Space(10) & "World"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top