|
本帖最后由 zjdh 于 2012-5-9 14:30 编辑
- Private Sub CommandButton1_Click() '添加数据
- If ComboBox1 = "" Then Exit Sub
- Dim Itm As ListItem, i As Integer
- Set Itm = ListView1.ListItems.Add()
- Itm.Text = ComboBox1
- For i = 1 To 8
- Itm.SubItems(i) = Controls("ComboBox" & i + 1)
- Next
- Itm.SubItems(10) = ComboBox10
- Itm.SubItems(11) = ComboBox11
- Itm.SubItems(12) = ComboBox12
- For i = 7 To 10
- Me.Controls("ComboBox" & i) = ""
- Next
- For i = 1 To ListView1.ListItems.Count
- 金额1 = ListView1.ListItems(i).SubItems(6) + 金额1
- 金额2 = ListView1.ListItems(i).SubItems(7) + 金额2
- 金额3 = ListView1.ListItems(i).SubItems(8) + 金额3
- Next
- Label1 = "合 计"
- Label2 = Format(金额1, "#,###.00")
- Label3 = Format(金额2, "#,###.00")
- Label17 = Format(金额3, "#,###.00")
- End Sub
复制代码 |
评分
-
查看全部评分
|