我设置了3个label,在某个字段里有3位的数字,我想每个一label按照顺序显示一位,如何实现??

解决方案 »

  1.   

    Private Sub Form_Load()
    Dim s As String
    Dim ss() As String
    Dim a, b As Integer
    s = "a b c"
    ss = Split(s)
    a = UBound(ss)
    ReDim Preserve ss(0 To a)
    For b = 0 To a
        Label1(b).Caption = ss(b)
    Next
    End Sub
      

  2.   

    dim a as string, b as string, c as string, temp as string
    dim num as stringnum = right("000" & str(value),3) 'value 3位数, 不足3位补0a = left(num,1)
    b = mid(num,2,1)
    c = right(num,1)if a > b then
       temp=a
       a = b
       b = temp
    end ifif b > c then
       temp = b
       b = c
       c = temp
    end if
        
    label1= a : lable2 = b : label3 = c '从小到大
      

  3.   

    刚才那个不好
    重新写了个
    Private Sub Form_Load()
    Dim s As String
    Dim ss() As Byte
    Dim a, b As Integer
    s = "123"
    ss = StrConv(s, vbFromUnicode)
    a = UBound(ss)
    ReDim Preserve ss(0 To a)
    For b = 0 To a
        Label1(b).Caption = Chr(ss(b))
    Next
    End Sub
      

  4.   

    3位的数字,想每个一label按照顺序显示一位
    dim i as integer
    for i=1 to len(rst(0))
      label1(i-1)=mid(rst(0),i,1)
    next