|
发表于 2012-8-15 22:29
|
显示全部楼层
本楼为最佳答案
Private Sub CommandButton8_Click()
Dim myrow As Long, x As Integer
myrow = Cells(29, 2).End(xlUp).Row + 1
If Me.CheckBox1.Value = True Then Cells(myrow, 2) = 品名.Text '赋值给=》品名
If Me.CheckBox2.Value = True Then Cells(myrow, 3) = TextBox1.Text '赋值给=》底带规格
If Me.CheckBox3.Value = True Then Cells(myrow, 4) = TextBox3.Text '赋值给=》底带单价
If Me.CheckBox4.Value = True Then Cells(myrow, 6) = 样式.Text '赋值给=》胶盘样式
If Me.CheckBox5.Value = True Then Cells(myrow, 9) = TextBox11.Text '赋值给=》异常数量
If Me.CheckBox6.Value = True Then Cells(myrow, 10) = TextBox12.Text '赋值给=》返工数量
If Me.CheckBox7.Value = True Then Cells(myrow, 11) = TextBox13.Text '赋值给=》异常原因
If OptionButton1.Value = True Then Cells(myrow, 5) = TextBox4.Text '选项按钮1的值为真时,将文本框4的值,赋值给=》底带长度
If OptionButton2.Value = True Then Cells(myrow, 5) = TextBox5.Text '选项按钮2的值为真时,将文本框5的值,赋值给=》底带长度
If OptionButton3.Value = True Then Cells(myrow, 5) = TextBox6.Text '选项按钮3的值为真时,将文本框6的值,赋值给=》底带长度
If OptionButton4.Value = True Then Cells(myrow, 5) = TextBox7.Text '选项按钮4的值为真时,将文本框7的值,赋值给=》底带长度
If OptionButton5.Value = True Then Cells(myrow, 5) = TextBox8.Text '选项按钮5的值为真时,将文本框8的值,赋值给=》底带长度
If OptionButton6.Value = True Then Cells(myrow, 5) = TextBox9.Text '选项按钮6的值为真时,将文本框9的值,赋值给=》底带长度
If OptionButton7.Value = True Then Cells(myrow, 5) = TextBox10.Text '选项按钮7的值为真时,将文本框10的值,赋值给=》底带长度
End Sub |
|