VBA in Excel, Know a way to disable SORT without protectsheet?

  • Thread starter Thread starter Guest
  • Start date Start date
zulfer7 said:
Can Anyone Help?

Hi,

Try adding the following line to an 'Auto_Open' macro in your workbook:

CommandBars("Worksheet Menu_ Bar").Controls("Data").Controls("Sort").Enabled
= False

You will need to change this back again again by changing 'False' to 'True'
when you leave your workbook.

HTH

Neil
www.nwarwick.co.uk
 
For some reason I have to add ... to the sort command but it works fine now.
Thanks!
Sub auto_open()

CommandBars("Worksheet Menu
Bar").Controls("Data").Controls("Sort...").Enabled = False

End Sub
 
Back
Top