View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
James[_43_] James[_43_] is offline
external usenet poster
 
Posts: 6
Default Displaying question

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

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


"WLMPilot" wrote in message
...
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