+ Reply to Thread
Results 1 to 3 of 3

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

  1. #1
    zulfer7
    Guest

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

    Can Anyone Help?

  2. #2
    Neil
    Guest

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

    "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


  3. #3
    zulfer7
    Guest

    RE: 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...").Enabled = 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
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1