|
楼主 |
发表于 2013-7-26 10:51
|
显示全部楼层
adders 发表于 2013-7-26 10:31
我用2003英文版,以前其他人以中文版打开时似乎也会有模块找不到或运行不匹配的问题,尤其是用Form Control ...
那固定20个人的表格能不能像下面你的这段代码(红色方面)一样写入呀?谢谢
Const sHeaderMain As String = "2013年江南市公开招聘中小学教师试教顺序抽签登记表"
Const sHeaderDate As String = " 日期:2013 年 月 日"
Const sBottom As String = " 计(核)分员签名: 监督员签名:"
Dim LastRow1 As Long, i As Long, i1 As Long, i3 As Long, n3 As Long
Dim colMG As Collection, Cel As Range
LastRow1 = Cells(Rows.Count, "F").End(xlUp).Row
If LastRow1 < StartRow1 Then Exit Sub
Application.ScreenUpdating = False
Set colMG = New Collection
On Error Resume Next
For Each Cel In Range(Cells(StartRow1, "F"), Cells(LastRow1, "F"))
colMG.Add Cel, CStr(Cel)
Next Cel
On Error GoTo 0
i = 1
i3 = StartRow3
With Sheet3
.Cells.Clear
.Columns(1).ColumnWidth = 6
.Columns(2).ColumnWidth = 35
.Columns("C:E").ColumnWidth = 12
End With
Do Until i > colMG.Count
With Sheet3
n3 = 1
With .Range("A" & i3)
.Value = sHeaderMain
.Offset(1).Value = " 试室号:第" & i & "试室"
.Offset(1, 2).Value = sHeaderDate
With .Offset(2).Resize(1, 5)
.Value = Array("序号", "报考岗位", "姓名", "试教顺序", "备注")
|
|