I would like to be able to disable only sorting in tables in worksheet, but at the same time allow filtering.
I have tried the following code, that I have found here in the website, but have not got it to work correctly, does any one see what I need to add or remove to get this to work.
Code
Private Sub Workbook_Activate()
With Application.CommandBars
.FindControl(ID:=928).Enabled = False
.FindControl(ID:=210).Enabled = False
.FindControl(ID:=211).Enabled = False
End With
End Sub
Private Sub Workbook_Deactivate()
With Application.CommandBars
.FindControl(ID:=928).Enabled = True
.FindControl(ID:=210).Enabled = True
.FindControl(ID:=211).Enabled = True
End With
End Sub
Display More
Lastly, I am newly using VBA.
thank you!
Ibrahim