Re: Outlining in Protected Sheet - Attention DP
- From: "Chiku" <Chiku@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 15 Dec 2005 07:06:02 -0800
Dave, you explain even technical stuff very well - THANK YOU!!!! At this
rate, I will become a programmer :) Thanks a lot, I will try and avoid doing
programming stuff coz that is how I am getting stuck, but you do explain
things so well that it is easy for non-programmer like me to figure out.
Thank you!!!!
"Dave Peterson" wrote:
> It means that you can't do what you want manually. You have to use code to make
> it work the way you want.
>
> And this is a setting that excel won't remember tomorrow if you set it today.
> You have to reset it each time you open that file.
>
> ========
> #1. It looks at Sheet1 (change that to match your sheet name). It protects the
> sheet using a password--I used "hi", change it to match your password. The
> ..enableoutlining enables the outlining feature. The .enableautofilter will
> enable you to use the filter arrows.
>
> But both of these have to be applied before the code runs--you can't add
> data|filter or Data|group with the worksheet protected. You apply those
> manually (usually).
>
> #2. This code doesn't go behind a worksheet or behind ThisWorkbook. It goes
> into a general module.
>
> Option explicit
> is the way developers tell excel that they are going to be declaring every
> variable that they use.
>
> That should be used once (per module) and it should appear at the top of the
> module.
>
>
>
> Chiku wrote:
> >
> > I have a question about a previous code I saw for maintaining outlines in a
> > protected worksheet. DP, if you read this, need your help - the code was one
> > you posted for someone.
> >
> > Before the code, your wrotes:
> >
> > If you already have the outline applied, you can protect the worksheet in code
> > (auto_open/workbook_open??) - What does this mean?
> >
> > The code is as follows:
> >
> > Option Explicit
> > Sub auto_open()
> > With Worksheets("sheet1")
> > .Protect Password:="hi", userinterfaceonly:=True
> > .EnableOutlining = True
> > .EnableAutoFilter = True
> > End With
> > End Sub
> >
> > At the end, you also add that it needs to be reset each time, what too does
> > that mean?
> >
> > Two other small questions
> > 1.) - what is the code doing exactly (I just need to understand what it says
> > in simple terms which helps me understand and change the code if necessary)
> > 2.)And two, everytime I paste it, the "Option Explicit" always pastes
> > separately. Should I be pasting this under View code on worksheet or
> > somewhere else? (I admit, my programming knowledge is limited but I can
> > understand if it's explained)
> > Thanks in advance.
>
> --
>
> Dave Peterson
>
.
- Follow-Ups:
- Re: Outlining in Protected Sheet - Attention DP
- From: Dave Peterson
- Re: Outlining in Protected Sheet - Attention DP
- References:
- Re: Outlining in Protected Sheet - Attention DP
- From: Dave Peterson
- Re: Outlining in Protected Sheet - Attention DP
- Prev by Date: Re: Conditional Sum Problem
- Next by Date: Re: Copy/Paste
- Previous by thread: Re: Outlining in Protected Sheet - Attention DP
- Next by thread: Re: Outlining in Protected Sheet - Attention DP
- Index(es):
Relevant Pages
|