G
Guest
Hi All
I have crated a custom command bar using the following
code:
Sub LoadSortBar()
Dim customBar As CommandBar
Dim newButton As CommandBarButton
On Error Resume Next
Set customBar = CommandBars.Add("SortBar", msoBarTop)
Set newButton = customBar.Controls.Add
(msoControlButton, ID:=210)
Set newButton = customBar.Controls.Add
(msoControlButton, ID:=211)
Set newButton = customBar.Controls.Add
(msoControlButton, ID:=928)
customBar.Visible = True
customBar.Enabled = True
End Sub
However when I protect the sheet by selecting Tools |
Protection | Protect sheet, this command bar is disabled.
Is there away to protect the sheet and have this command
bar enabled.
Thanks
I have crated a custom command bar using the following
code:
Sub LoadSortBar()
Dim customBar As CommandBar
Dim newButton As CommandBarButton
On Error Resume Next
Set customBar = CommandBars.Add("SortBar", msoBarTop)
Set newButton = customBar.Controls.Add
(msoControlButton, ID:=210)
Set newButton = customBar.Controls.Add
(msoControlButton, ID:=211)
Set newButton = customBar.Controls.Add
(msoControlButton, ID:=928)
customBar.Visible = True
customBar.Enabled = True
End Sub
However when I protect the sheet by selecting Tools |
Protection | Protect sheet, this command bar is disabled.
Is there away to protect the sheet and have this command
bar enabled.
Thanks