|
Private Sub CommandButton1_Click()
Dim record(1 To 3, 1 To 4) As Object
Set record(1, 1) = TextBox2
Set record(2, 1) = TextBox3
Set record(3, 1) = TextBox4
Set record(1, 2) = TextBox5
Set record(2, 2) = TextBox6
Set record(3, 2) = TextBox7
Set record(1, 3) = TextBox8
Set record(2, 3) = TextBox9
Set record(3, 3) = TextBox10
Set record(1, 4) = TextBox11
Set record(2, 4) = TextBox12
Set record(3, 4) = TextBox13
Dim i As Integer
Dim m As Integer
If TextBox1.Text = "" Then
MsgBox "kong"
End If
For i = 1 To 3
Sheet2.Select
Range("a1").Select
ActiveCell.End(xlDown).Select
If record(i, 1) = "" Then
MsgBox "kongde"
End
For m = 1 To 4
ActiveCell.Offset(1, 0).Value = TextBox1.Text
ActiveCell.Offset(1, m - 1).Value = record(i, m).Text
Next
End If
Next
End Sub
请问,为什么我这个代码在EXCEL中不能实现?数据输不进去
还有Set record(3, 4) = TextBox13是什么意思? |
|