View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default Protecting Forms

to clarify what filo666 wrote...

The code that was mentioned should be refered to by the changing of the
dropdown value. Let's say that "1" was selected from the drop down, with
that selection only cells A1, B3, and C7 are able to be edited, in the event
for the dropdown you would need to turn protection on and off for any cells
that might be changing. You can do this with filo's code.

I much prefer using actual userforms through VBA to perform these types of
things. much easier to control. You might want to look into doing that in
the future.

"filo666" wrote:

Its rare you havent found anything about the subject.
Very easy:


Range("YourRange").Locked = true €˜if you dont want the user to modigy the
range
Range("YourRange").Locked = false €˜If you want so
This should be writed in some on_change event (May be on your worksheet on
change event, I dont know your file)

HTH
"Mon" wrote:

I've searched previous questions and cannot find quiet what I'm looking for.
I've created a form for my workplace - an expense form that allows employees
to turn in various expenses. I have the form set up where it has various
validations (dates, text lengths, etc), check boxes (set to unhide cells when
checked), drop down lists and conditional formatting. My conditional
formatting is conditioned upon which option they choose in the drop down list
(certain cells highlight when a topic is chosen - so the employee knows where
to fill in).
How do I go about in protecting this form? When they choose a topic in the
drop down list and the cells that need to be filled in highlight - how do I
protect it so they can't fill in the other cells? Is this possible? Also,
is there a way where they can just tab to the cell that is highlighted,
skipping the unhighlighted cells?
Hope my questions makes sense...
thanks for any help anyone can provide!