- Sub P1()
- Dim x As Integer
- Call Module3.che
- For x = 3 To 7
- Range(Cells(6, 4), Cells(x + 3, 4)) = UserForm1.T1
- Range(Cells(7, 4), Cells(x + 3, 4)) = UserForm1.T2
- Range(Cells(8, 4), Cells(x + 3, 4)) = UserForm1.T3
- Range(Cells(9, 4), Cells(x + 3, 4)) = UserForm1.T4
- Range(Cells(10, 4), Cells(x + 3, 4)) = UserForm1.T5
- Range(Cells(6, 5), Cells(x + 3, 5)) = UserForm1.T6
- Range(Cells(7, 5), Cells(x + 3, 5)) = UserForm1.T7
- Range(Cells(8, 5), Cells(x + 3, 5)) = UserForm1.T8
- Range(Cells(9, 5), Cells(x + 3, 5)) = UserForm1.T9
- Range(Cells(10, 5), Cells(x + 3, 5)) = UserForm1.T10
- Range(Cells(6, 6), Cells(x + 3, 6)) = UserForm1.T11
- Range(Cells(7, 6), Cells(x + 3, 6)) = UserForm1.T12
- Range(Cells(8, 6), Cells(x + 3, 6)) = UserForm1.T13
- Range(Cells(9, 6), Cells(x + 3, 6)) = UserForm1.T14
- Range(Cells(10, 6), Cells(x + 3, 6)) = UserForm1.T15
- Range(Cells(6, 7), Cells(x + 3, 7)) = UserForm1.T16
- Range(Cells(7, 7), Cells(x + 3, 7)) = UserForm1.T17
- Range(Cells(8, 7), Cells(x + 3, 7)) = UserForm1.T18
- Range(Cells(9, 7), Cells(x + 3, 7)) = UserForm1.T19
- Range(Cells(10, 7), Cells(x + 3, 7)) = UserForm1.T20
- Range(Cells(6, 8), Cells(x + 3, 8)) = UserForm1.T21
- Range(Cells(7, 8), Cells(x + 3, 8)) = UserForm1.T22
- Range(Cells(8, 8), Cells(x + 3, 8)) = UserForm1.T23
- Range(Cells(9, 8), Cells(x + 3, 8)) = UserForm1.T24
- Range(Cells(10, 8), Cells(x + 3, 8)) = UserForm1.T25
- Range(Cells(6, 9), Cells(x + 3, 9)) = UserForm1.T26
- Range(Cells(7, 9), Cells(x + 3, 9)) = UserForm1.T27
- Range(Cells(8, 9), Cells(x + 3, 9)) = UserForm1.T28
- Range(Cells(9, 9), Cells(x + 3, 9)) = UserForm1.T29
- Range(Cells(10, 9), Cells(x + 3, 9)) = UserForm1.T30
- Range(Cells(6, 10), Cells(x + 3, 10)) = UserForm1.T31
- Range(Cells(7, 10), Cells(x + 3, 10)) = UserForm1.T32
- Range(Cells(8, 10), Cells(x + 3, 10)) = UserForm1.T33
- Range(Cells(9, 10), Cells(x + 3, 10)) = UserForm1.T34
- Range(Cells(10, 10), Cells(x + 3, 10)) = UserForm1.T35
- Range(Cells(6, 11), Cells(x + 3, 11)) = UserForm1.T36
- Range(Cells(7, 11), Cells(x + 3, 11)) = UserForm1.T37
- Range(Cells(8, 11), Cells(x + 3, 11)) = UserForm1.T38
- Range(Cells(9, 11), Cells(x + 3, 11)) = UserForm1.T39
- Range(Cells(10, 11), Cells(x + 3, 11)) = UserForm1.T40
- Range(Cells(6, 12), Cells(x + 3, 12)) = UserForm1.T41
- Range(Cells(7, 12), Cells(x + 3, 12)) = UserForm1.T42
- Range(Cells(8, 12), Cells(x + 3, 12)) = UserForm1.T43
- Range(Cells(9, 12), Cells(x + 3, 12)) = UserForm1.T44
- Range(Cells(10, 12), Cells(x + 3, 12)) = UserForm1.T45
- Next
- End Sub
复制代码
本帖最后由 Zipall 于 2011-12-28 23:33 编辑
443233785 发表于 2011-12-28 23:13
请看附件,谢谢
改3处,我用红色标记出
For x = 3 To 7
For j = 4 To 12
For i = 6 To 10
t = t + 1
Range(Cells(i, j), Cells(x + 3, j)) = UserForm1.Controls("T" & t)
Next
Next
t = 0
Next
|