Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default I need to control how users sort in a specific excell worksheet

I am in charge of supporting a multiuser xls worksheet, where different users
need to conduct a sort in data. From time to time a sort is made only on
parts of rows and new data is inserted in some fields. This results in
disruption of the data when the sheet is resorted back to original sort. What
I would like to do is for this worksheet alone to maybe make a macro that
disables sorting by default, and only sorts by using my macro to make sure
that a sort only can be made on the entire worksheet. Once the data is
disrupted the dept. in question has to use 20+ workhours to restore the data.
Please lend me a hand
Hopefull

Kim
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default I need to control how users sort in a specific excell worksheet

This macro snippet will disable the 'Sort' button.
Change 'False' to 'True' to enable the 'Sort' Button.

'/=========================================/
Dim ctrl As Object, ctrlMenuItem As Object

For Each ctrl In CommandBars("Worksheet Menu Bar").Controls
If ctrl.Caption = "&Data" Then
For Each ctrlMenuItem In ctrl.Controls
If ctrlMenuItem.Caption = "&Sort..." Then
ctrlMenuItem.Enabled = False
Exit For
End If
Next ctrlMenuItem
Exit For
End If
Next ctrl
'/=========================================/
HTH,
--
Gary Brown

Please rate this posting if it is helpful to you.


"Kim Melkane" wrote:

I am in charge of supporting a multiuser xls worksheet, where different users
need to conduct a sort in data. From time to time a sort is made only on
parts of rows and new data is inserted in some fields. This results in
disruption of the data when the sheet is resorted back to original sort. What
I would like to do is for this worksheet alone to maybe make a macro that
disables sorting by default, and only sorts by using my macro to make sure
that a sort only can be made on the entire worksheet. Once the data is
disrupted the dept. in question has to use 20+ workhours to restore the data.
Please lend me a hand
Hopefull

Kim

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default I need to control how users sort in a specific excell workshee

thanks a bundle, great help!

"Gary Brown" wrote:

This macro snippet will disable the 'Sort' button.
Change 'False' to 'True' to enable the 'Sort' Button.

'/=========================================/
Dim ctrl As Object, ctrlMenuItem As Object

For Each ctrl In CommandBars("Worksheet Menu Bar").Controls
If ctrl.Caption = "&Data" Then
For Each ctrlMenuItem In ctrl.Controls
If ctrlMenuItem.Caption = "&Sort..." Then
ctrlMenuItem.Enabled = False
Exit For
End If
Next ctrlMenuItem
Exit For
End If
Next ctrl
'/=========================================/
HTH,
--
Gary Brown

Please rate this posting if it is helpful to you.


"Kim Melkane" wrote:

I am in charge of supporting a multiuser xls worksheet, where different users
need to conduct a sort in data. From time to time a sort is made only on
parts of rows and new data is inserted in some fields. This results in
disruption of the data when the sheet is resorted back to original sort. What
I would like to do is for this worksheet alone to maybe make a macro that
disables sorting by default, and only sorts by using my macro to make sure
that a sort only can be made on the entire worksheet. Once the data is
disrupted the dept. in question has to use 20+ workhours to restore the data.
Please lend me a hand
Hopefull

Kim

Reply
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
protect worksheet but allow users to use specific columns/cells mexpedip Excel Discussion (Misc queries) 1 June 3rd 09 02:40 PM
Protect a worksheet, but allow ONLY specific users to change info tara Excel Worksheet Functions 1 February 18th 06 12:10 AM
macro to sort data in worksheet by specific date joey Excel Discussion (Misc queries) 0 November 14th 05 07:59 PM
I need to control how users sort in a specific excell worksheet Kim Melkane Excel Programming 0 May 31st 05 01:21 PM
How to you lockout the comments in Excell from other users? rescue336 Excel Discussion (Misc queries) 2 May 13th 05 06:01 PM


All times are GMT +1. The time now is 06:51 AM.

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"