|
题目与图片作一个对应的ID编号不得了,选择题目时,自动通过ID识别并插入图片
你的系统有点小流氓:
Sub 考试环境()
On Error Resume Next
'关闭所有内置工具条
For Each bar In Application.CommandBars
bar.Enabled = False
Next
Application.DisplayFormulaBar = False
End Sub
Sub 禁用系统关闭按钮()
Dim hWnd As Long, hMenu As Long
Dim iRet As Long
hWnd = FindWindow("XLMAIN", Application.Caption)
hMenu = GetSystemMenu(hWnd, 0)
iRet = DeleteMenu(hMenu, SC_CLOSE, 0)
iRet = DrawMenuBar(hWnd)
ActiveWorkbook.Protect Structure:=True, Windows:=True '保护工作簿窗口
End Sub
Sub 还原系统关闭按钮()
Dim hWnd As Long, hMenu As Long
Dim iRet As Long
hWnd = FindWindow("XLMAIN", Application.Caption)
hMenu = GetSystemMenu(hWnd, 1)
iRet = DrawMenuBar(hWnd)
ActiveWorkbook.Protect Structure:=False, Windows:=False '解除保护工作簿窗口
End Sub
这时候只能专心考试,其他工作薄就不要正常操作了么.... |
|