<p>Sub Disable()<br/> Dim ctl As CommandBarControl<br/> <br/> For Each ctl In Application.CommandBars("Cell").Controls<br/> If ctl.ID = 21 Or ctl.ID = 19 Then<br/> ctl.Visible = False<br/> ctl.Enabled = False<br/> End If<br/> Next<br/>End Sub</p><p>Sub Enablse()<br/> Dim ctl As CommandBarControl<br/> <br/> For Each ctl In Application.CommandBars("Cell").Controls<br/> If ctl.ID = 21 Or ctl.ID = 19 Then<br/> ctl.Visible = True<br/> ctl.Enabled = True<br/> End If<br/> Next<br/>End Sub</p>
[此贴子已经被作者于2008-2-15 14:39:06编辑过] |