<?xml version="1.0" encoding="utf-8"?>
<vg version="723" range="0,0,1024,768" scrollbars="0" papervisible="false">
<sheet name="sheet1" visible="false">
<text name="text1" origin="146,74" bounds="8,32,468,404" autosize="true" border="0" fontname="宋体" fontsize="12" textalign="1" lineinterval="4" text="把当前选中的图形锁定或把锁定的图形解锁。被锁定的图形，无法简单地用鼠标选中。

实现方式如下：

b = false
n = ActiveSheet.Selection.UnitCount
i = 0
while i &lt; n
  d = ActiveSheet.Selection.Units[i]
  if not d.Locked then
    b = true
    break;
  end if
  i = i + 1
wend
i = 0
BeginUpdate()
while i &lt; n
  d = ActiveSheet.Selection.Units[i]
  d.Locked = b
  i = i + 1
wend
EndUpdate()"/>
<text name="text2" origin="10,18" bounds="8,8,77,24" autosize="true" border="0" fontname="宋体" fontsize="12" fontstyle="1" textalign="1" text="加锁与解锁"/>
</sheet>
</vg>
