Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default autosorting protected data with macros

I have a set of data that i share with other users and allow them to autosort
through. The data is protected so that the other users cannot corrupt the
data.

I recently wrote some macros that include detailed multilevel autosorts of
the same data. i wrote and tested the macros with no protection and they
function well.

When i reprotect my data and then attempt to run my macro i get a run time
error telling me i cannot do an autosort on a protected sheet on lines like
the one below...

Selection.AutoFilter Field:=8, Criteria1:="0"

Any suggestions ???

--
dr chuck
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default autosorting protected data with macros

chuck

See Debra Dalgleish's site for info on why you can't create an autofilter on a
protected sheet.

Also a couple of work-arounds to allow it.

http://www.contextures.com/xlautofilter03.html#Protect




On Sun, 18 Jun 2006 17:23:01 -0700, dr chuck
wrote:

I have a set of data that i share with other users and allow them to autosort
through. The data is protected so that the other users cannot corrupt the
data.

I recently wrote some macros that include detailed multilevel autosorts of
the same data. i wrote and tested the macros with no protection and they
function well.

When i reprotect my data and then attempt to run my macro i get a run time
error telling me i cannot do an autosort on a protected sheet on lines like
the one below...

Selection.AutoFilter Field:=8, Criteria1:="0"

Any suggestions ???


Gord Dibben MS Excel MVP
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default autosorting protected data with macros

thanks will check it out....
Wonder if i had my macro turn off the protection when it filtered and then
turn it back on after filter if that would resolve my data protection issues?
--
dr chuck


"Gord Dibben" wrote:

chuck

See Debra Dalgleish's site for info on why you can't create an autofilter on a
protected sheet.

Also a couple of work-arounds to allow it.

http://www.contextures.com/xlautofilter03.html#Protect




On Sun, 18 Jun 2006 17:23:01 -0700, dr chuck
wrote:

I have a set of data that i share with other users and allow them to autosort
through. The data is protected so that the other users cannot corrupt the
data.

I recently wrote some macros that include detailed multilevel autosorts of
the same data. i wrote and tested the macros with no protection and they
function well.

When i reprotect my data and then attempt to run my macro i get a run time
error telling me i cannot do an autosort on a protected sheet on lines like
the one below...

Selection.AutoFilter Field:=8, Criteria1:="0"

Any suggestions ???


Gord Dibben MS Excel MVP

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default autosorting protected data with macros

Yes. That would be another method.

Sub Do_Stuff()
ActiveSheet.Unprotect Password:="justme"

'your code here

ActiveSheet.Protect Password:="justme"
End Sub


Gord


On Mon, 19 Jun 2006 08:12:02 -0700, dr chuck
wrote:

thanks will check it out....
Wonder if i had my macro turn off the protection when it filtered and then
turn it back on after filter if that would resolve my data protection issues?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default autosorting protected data with macros

thanks gord
--
dr chuck


"Gord Dibben" wrote:

Yes. That would be another method.

Sub Do_Stuff()
ActiveSheet.Unprotect Password:="justme"

'your code here

ActiveSheet.Protect Password:="justme"
End Sub


Gord


On Mon, 19 Jun 2006 08:12:02 -0700, dr chuck
wrote:

thanks will check it out....
Wonder if i had my macro turn off the protection when it filtered and then
turn it back on after filter if that would resolve my data protection issues?





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
AUTOSORTING FARAZ QURESHI Excel Discussion (Misc queries) 2 January 16th 07 10:25 PM
Need help autosorting information into different cells Shukumi Excel Discussion (Misc queries) 1 July 29th 06 09:53 PM
Autosorting Information Rosc076 Excel Worksheet Functions 0 June 27th 06 08:10 PM
autosorting to a leaderboard ano Excel Discussion (Misc queries) 1 December 2nd 05 04:17 PM
Autosorting and working out medalists for data. Steve Hill Excel Programming 2 December 17th 03 07:21 PM


All times are GMT +1. The time now is 09:55 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"