【发布时间】:2018-11-14 01:34:55
【问题描述】:
当工作簿中的工作表被锁定时,我正在使用以下 VBA 脚本为用户提供某些权限。我无法弄清楚如何添加一条还允许用户隐藏和取消隐藏列的行。有什么建议吗?
Sub EnableOutlining()
'Update 20140603
Dim xWs As Worksheet
Set xWs = Application.ActiveSheet
Dim xPws As String
xPws = Application.InputBox("Password:", xTitleId, "", Type:=2)
xWs.Protect Password:=xPws, Userinterfaceonly:=True
xWs.EnableOutlining = True
xWs.EnableOutlining = True
xWs.EnableAutoFilter = True
xWs.EnableFormatConditionsCalculation = True
End Sub
【问题讨论】: