注册 登录
编程论坛 VB6论坛

设置文本框的背景颜色

lw2560 发布于 2013-04-01 20:01, 646 次点击
大侠们帮我看看下面代码哪里不对
myarray = Array("会员卡号", "姓名", "证件类型", "证件号码", "住址", "联系电话", "余额")
For i = 0 To UBound(myarray)
  Me.Controls(myarray(i)).BackColor = &HE0E0E0
Next


[ 本帖最后由 lw2560 于 2013-4-3 21:25 编辑 ]
1 回复
#2
mpy20032013-04-02 09:24
程序代码:
    With Nlist
   
        .ColumnHeaders.Clear
      
        .ListItems.Clear
      
        .ColumnHeaders.Add , , "文件名", .Width * 2.8 / 10, lvwColumnLeft
      
        .ColumnHeaders.Add , , "类型", .Width * 0.6 / 10, lvwColumnCenter
      
        .ColumnHeaders.Add , , "修改日期", .Width * 1.2 / 10, lvwColumnLeft
      
        .ColumnHeaders.Add , , "路径", .Width * 6.7 / 10, lvwColumnLeft
      
        .View = lvwReport
      
        .Gridlines = True
      
        .FullRowSelect = True
      
        .CheckBoxes = True
      
        For i = 3 To ThisWorkbook.Sheets("DATA").[E1048576].End(xlUp).Row
      
        Set ITM = .ListItems.Add()
      
        ITM.Text = ThisWorkbook.Sheets("DATA").Cells(i, 5)
      
        ITM.SubItems(1) = ThisWorkbook.Sheets("DATA").Cells(i, 6)
      
        ITM.SubItems(2) = ThisWorkbook.Sheets("DATA").Cells(i, 7)
      
        ITM.SubItems(3) = ThisWorkbook.Sheets("DATA").Cells(i, 8)
      
        Next i
      
    End With
1