PDA

View Full Version : Prevent / Disable Sort function ?



bdsii
01-26-2010, 03:16 PM
For a shared workbook that requires editing of data from multiple users, is there any way to prevent or disable the sort function using VBA ?

I have found something similar for disabling the SAVE AS command and am hoping there is code for doing the same to the Sort command without protecting the worksheet to not allow the edits that are required.

Ideas / Thoughts ? :think:

Thanks !

bdsii
01-27-2010, 09:45 AM
It appears that doing what I would like to do via VBA is not possible. I have found a different way of handling it that I wanted to pass along here in case it also helps someone else.

I tried the VBA code:


ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowSorting:=False


but that did not allow for editing the text inside the spreadsheet.

After further research, this can be accomplished by going to the Review tab and then set-up ranges that users can edit by going to the Allow Users to Edit Ranges button. You then have to protect the sheet afterward but it will allow for the protection of the basic spreadsheet but allow users to enter data as necessary.

Anyone else have ideas on this without protecting the entire sheet ?