Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 34
Default Hiding rows with cells locked using format protection lock functio

I have a macro that hides rows based on 0 value in certain rows in a single
column using autofilter. I have as a convenience, protected two columns of
data to the left of the sorted column so that user can just use the enter key
to pass over the two columns to the next allowable editable cell. But because
I have locked the cells in those columns, my macro will not collapse the
sheet based on 0 values next to the cells that are locked. My feeling is that
I won't be able to get around this. Or can I?...
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Hiding rows with cells locked using format protection lock functio

You could add an unprotect line to your code, do the collapse then re-protect
the sheet.

Sub foo()

ActiveSheet.Unprotect Password:="justme"
'your code rund here
ActiveSheet.Protect Password:="justme"

End Sub


Gord Dibben MS Excel MVP

On Tue, 6 May 2008 07:53:00 -0700, John G.
wrote:

I have a macro that hides rows based on 0 value in certain rows in a single
column using autofilter. I have as a convenience, protected two columns of
data to the left of the sorted column so that user can just use the enter key
to pass over the two columns to the next allowable editable cell. But because
I have locked the cells in those columns, my macro will not collapse the
sheet based on 0 values next to the cells that are locked. My feeling is that
I won't be able to get around this. Or can I?...


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 34
Default Hiding rows with cells locked using format protection lock fun

My brain gets muddled and can't see the forrest for the trees. There is
always a work around. Thanks!

"Gord Dibben" wrote:

You could add an unprotect line to your code, do the collapse then re-protect
the sheet.

Sub foo()

ActiveSheet.Unprotect Password:="justme"
'your code rund here
ActiveSheet.Protect Password:="justme"

End Sub


Gord Dibben MS Excel MVP

On Tue, 6 May 2008 07:53:00 -0700, John G.
wrote:

I have a macro that hides rows based on 0 value in certain rows in a single
column using autofilter. I have as a convenience, protected two columns of
data to the left of the sorted column so that user can just use the enter key
to pass over the two columns to the next allowable editable cell. But because
I have locked the cells in those columns, my macro will not collapse the
sheet based on 0 values next to the cells that are locked. My feeling is that
I won't be able to get around this. Or can I?...



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Hiding rows with cells locked using format protection lock fun

Happy to help.

Thanks for the feedback.

I think "rund" was to be "runs"


Gord

On Tue, 6 May 2008 13:48:34 -0700, John G.
wrote:

My brain gets muddled and can't see the forrest for the trees. There is
always a work around. Thanks!

"Gord Dibben" wrote:

You could add an unprotect line to your code, do the collapse then re-protect
the sheet.

Sub foo()

ActiveSheet.Unprotect Password:="justme"
'your code rund here
ActiveSheet.Protect Password:="justme"

End Sub


Gord Dibben MS Excel MVP

On Tue, 6 May 2008 07:53:00 -0700, John G.
wrote:

I have a macro that hides rows based on 0 value in certain rows in a single
column using autofilter. I have as a convenience, protected two columns of
data to the left of the sorted column so that user can just use the enter key
to pass over the two columns to the next allowable editable cell. But because
I have locked the cells in those columns, my macro will not collapse the
sheet based on 0 values next to the cells that are locked. My feeling is that
I won't be able to get around this. Or can I?...




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
Protection - Allow Group/Ungroup but lock / unlock some cells LinLin Excel Discussion (Misc queries) 2 November 18th 07 10:31 PM
What to do if the worksheet is locked on selecting rows or cells? ALYAK Excel Discussion (Misc queries) 2 January 10th 07 01:45 PM
Page Protection interfering with Hiding Rows [email protected] Excel Worksheet Functions 3 August 3rd 06 02:38 PM
Deleting rows with locked cells Paul Moore Excel Discussion (Misc queries) 3 June 18th 05 05:34 AM
The $ thing to lock cells at rows or columns [email protected] Excel Discussion (Misc queries) 2 December 27th 04 11:57 AM


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