Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default protect cells after listbox selection

How can I protect a range of cells after a listbox selection. Thanks, Chay
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default protect cells after listbox selection

Ok, that's probably the easiest one to deal with. You can attatch code to
the worksheet's _Change() event to detect when a change in a selection was
made and to figure out if that change took place in the area you are
interested in (where the data validation is used) and then perform actions
when it happens in a cell or cells that are 'of interest' to you.

I just recently uploaded a simple two-sheet workbook to demonstrate another
feature that involves this kind of thing - in this instance the desire was to
have the format of the cell/text where the data validation is used emulate
the format set up in the source list itself. But I think the workbook will
have value in showing you how things have to be set up for you to use the
_Change() event to test for a change in choice and take action based on it.
The workbook can be downloaded from he
http://www.jlathamsite.com/uploads/F...edListDemo.xls

Hopefully that will give you some good ideas. You're going to have to
consider:
possibly unprotecting the sheet before being able to alter the Locked status
of the cells you are going to work with,
performing the actual change in Locked status for the cells
re-protecting the sheet again if appropriate.

You can actually record a macro or two to give you a general idea of the
code needed to perform those operations, although a recorded macro is always
rather strict and literal in choosing sheets/cell ranges/etc and you may need
to make some changes to make the process a little more versatile and robust.


"Chay" wrote:

By the way I used data validation to create a listox. Thanks again and again.

"JLatham" wrote:

Please define 'listbox' - are you referring to a control from one of the
toolbars (the Controls Toolbar or the Forms Toolbar) placed onto a worksheet
or on a user form? Or could you be referring to a list created using Data
Validation in a cell on a worksheet?

Basically you're going to need some code associated with an event triggered
by a change in your listbox to do the work for you.

"Chay" wrote:

How can I protect a range of cells after a listbox selection. Thanks, Chay

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default protect cells after listbox selection

Also, Gord Dibben has given some good code example for the process in a post
in the other discussion with this same topic put up by you.

"Chay" wrote:

By the way I used data validation to create a listox. Thanks again and again.

"JLatham" wrote:

Please define 'listbox' - are you referring to a control from one of the
toolbars (the Controls Toolbar or the Forms Toolbar) placed onto a worksheet
or on a user form? Or could you be referring to a list created using Data
Validation in a cell on a worksheet?

Basically you're going to need some code associated with an event triggered
by a change in your listbox to do the work for you.

"Chay" wrote:

How can I protect a range of cells after a listbox selection. Thanks, Chay

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default protect cells after listbox selection

Thank you very much, JLathan. You a genius!!!!!

"JLatham" wrote:

Also, Gord Dibben has given some good code example for the process in a post
in the other discussion with this same topic put up by you.

"Chay" wrote:

By the way I used data validation to create a listox. Thanks again and again.

"JLatham" wrote:

Please define 'listbox' - are you referring to a control from one of the
toolbars (the Controls Toolbar or the Forms Toolbar) placed onto a worksheet
or on a user form? Or could you be referring to a list created using Data
Validation in a cell on a worksheet?

Basically you're going to need some code associated with an event triggered
by a change in your listbox to do the work for you.

"Chay" wrote:

How can I protect a range of cells after a listbox selection. Thanks, Chay

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
Password protect cells Christobo Excel Worksheet Functions 9 May 5th 10 02:34 PM
Linking Groups of cells between workbooks vnacj-joe Excel Discussion (Misc queries) 4 June 14th 07 05:18 PM
show the sum of an arbitary selection of cells Bob Oxley Excel Worksheet Functions 1 April 25th 06 07:55 PM
Protect Cells ??? Jcraig713 Excel Discussion (Misc queries) 2 January 27th 06 02:57 PM
How do I copy a LARGE selection of cells from Excel to powerpoint? Deadly Excel Discussion (Misc queries) 2 August 15th 05 03:21 PM


All times are GMT +1. The time now is 06:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"