Indentation Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • amolbehl
    New Member
    • May 2007
    • 63

    #1

    Indentation Problem

    Hi I am trying to write Information taken from database into a ListCheckBox.

    I need all the information to be indented. I tried to use code like

    nullStr = vbNullString
    ' We make the item a fixed length string
    length = 20 - Len(temp)
    For j = 0 To length
    nullStr = nullStr & " "
    Next j
    temp = temp & nullStr


    After this I have a few strings of variable length. Can anyone tell me how to do this or wht I am doing wrong because my output is anything but indented.
  • QVeen72
    Recognized Expert Top Contributor
    • Oct 2006
    • 1445

    #2
    Hi,

    Use Unidistant font for List Box .. say "Courier New", looks very neat and perfect

    Dim Str1 As String
    Dim Str2 As String
    Str1 = Left((Temp & Space(20)), 20)
    Str2 = Left((Temp2 & Space(10)), 10)

    List1.AddItem Str1 & " " & Str2

    Regards
    Veena

    Comment

    Working...