急!!怎样把Excel里的工具栏,窗口。。都隐藏?
麻烦高手们帮忙,在VBA中编写程序,使Excel的工具栏状态栏。。都隐藏起来,只剩下表格内容和标题。谢谢了先!!! --------------------编程问答-------------------- Dim i As IntegerFor i = 1 To Application.CommandBars.count
Application.CommandBars(i).Enabled = False
Next i --------------------编程问答-------------------- 谢谢hualoveqi!!但是我想只针对一个工作簿执行这个操作怎么办呢??你编的这个程序是把所有的Excel菜单工具栏都隐藏了~~~太感谢了~~~ --------------------编程问答-------------------- 再顶起来 --------------------编程问答-------------------- Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
Dim i As Integer
If ActiveSheet.Name = "Sheet1" Then
For i = 1 To Application.CommandBars.Count
Application.CommandBars(i).Enabled = False
Next i
Else
For i = 1 To Application.CommandBars.Count
Application.CommandBars(i).Enabled = True
Next i
End If
End Sub
放在事件(Workbook_SheetDeactivate)里执行试一试。 --------------------编程问答-------------------- --------------------编程问答-------------------- ding
补充:VB , VBA