LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
zulfer7
 
Posts: n/a
Default VBA in Excel, Know a way to disable SORT without protectsheet?

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...").Enable d = False

End Sub

"Neil" wrote:

"zulfer7" wrote:

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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
enable automatic refresh Vass Excel Worksheet Functions 2 March 11th 06 04:36 AM
I want to sort selected cells in Excel, not entire rows. Aeryn635 Excel Discussion (Misc queries) 1 June 1st 05 07:58 PM
How do I sort letters before numbers in Excel? RiverGirl Excel Discussion (Misc queries) 4 May 27th 05 04:09 PM
Sort Ascending button - Excel 2003 Ann Scharpf Excel Discussion (Misc queries) 0 May 23rd 05 11:11 PM
Sort Ascending button - Excel 2003 bigwheel Excel Discussion (Misc queries) 1 May 23rd 05 11:10 PM


All times are GMT +1. The time now is 10:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"