OK, here is the relevant part of the program I am working on:
For X = 1 To 10
XAsString = X
If X < 10 Then
XAsString = Chr(32) + XAsString
End If
Debug.Print XAsString
Form_Register.Controls("lstbxItem1").AddItem (XAsString)
Next X
So when I look at the debug printout it shows the variable XAsString has the space before the single digit. However, when it's added to the ListBox the space is deleted.
What I want to do is have the single digits Right Justified. I'm picky when it comes to how things are displayed on the screen. I don't want to use format with "@@" as it inserts a zero as the first digit for digits 1-9 and I don't want that either. I want it to have a space there. So how do I force the Listbox to keep the space when it's added to the list? Thanks again to all for your patience and help!
Ken L