|
楼主 |
发表于 2018-6-19 20:12
|
显示全部楼层
昨天未发现,今天发现一个错误,单选题选项“对、错;错、对”排列不利于答卷校对公式设置,修改代码:
Cells(5, 1).Value = "一、判断题,二选一,共30个,每个1分,共30分。"
For i = 1 To 90
If i Mod 3 = 0 Then
Cells(i + 3, 2).Value = i / 3 & "、"
'把题库随机题目写入序号右边单元格(通过数组)
Set sha = ActiveSheet.GroupBoxes.add(Cells(3).Left, Cells(i + 4, 3).Top - 1, Cells(3).Width, Cells(i + 4, 3).Height * 2 + 3)
sha.Visible = False
sha2.LinkedCell = "$N$" & i + 4
sha2.Characters.Text = "错。"
Else
Set sha2 = ActiveSheet.OptionButtons.add(Cells(3).Left, Cells(i + 6, 3).Top, Cells(3).Width, Cells(i + 6, 3).Height)
sha2.Characters.Text = "对。"
End If
Next
选项按“对、错;对、错”排列才合理。 |
|