当工作簿中的工作表被锁定时,我使用下面的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
https://stackoverflow.com/questions/50685272
复制相似问题