Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Cell Lockouts

I have just reopened a workbook that I built 2 years ago with much help from
Bill Manville. In the time that has passed, I have not had one opportunity
to use Visual Basic, and so what I learned, I have forgotten.

What I am trying to do is to revise the way I am locking out some data cells
based on the answer to a question in a leading cell. Currently in my
workbook, I ask a yes/no question, and if the answer is "yes", then the
following cell remains unlocked so that data can be entered. If the answer
is "no", the following cell locks so that when the User hits the tab key, he
is taken to the next section. This is all done with the following language:

ElseIf Not Intersect(Target, Me.Range("SCBCDYesNo")) Is Nothing Then
If Me.Range("SCBCDYesNo") = "NO" Then
Me.Range("SCBCDEff").Locked = True
Else
Me.Range("SCBCDEff").Locked = False
End If

The problem I have found is that if the lead cell (SCBCDYesNo) is left blank,
the SCBCDEff cell remains unlocked, and data can be entered. I would like it
to be locked in this case as well, only unlocking if the answer is "yes".

I've tried simple rewrites that have not worked, so I'm open for some
suggestions.

Thanks, Chuck Rollins

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Cell Lockouts

Forgot to say that I was working in Excel 2003... Anyone?

chuckrollins wrote:
I have just reopened a workbook that I built 2 years ago with much help from
Bill Manville. In the time that has passed, I have not had one opportunity
to use Visual Basic, and so what I learned, I have forgotten.

What I am trying to do is to revise the way I am locking out some data cells
based on the answer to a question in a leading cell. Currently in my
workbook, I ask a yes/no question, and if the answer is "yes", then the
following cell remains unlocked so that data can be entered. If the answer
is "no", the following cell locks so that when the User hits the tab key, he
is taken to the next section. This is all done with the following language:

ElseIf Not Intersect(Target, Me.Range("SCBCDYesNo")) Is Nothing Then
If Me.Range("SCBCDYesNo") = "NO" Then
Me.Range("SCBCDEff").Locked = True
Else
Me.Range("SCBCDEff").Locked = False
End If

The problem I have found is that if the lead cell (SCBCDYesNo) is left blank,
the SCBCDEff cell remains unlocked, and data can be entered. I would like it
to be locked in this case as well, only unlocking if the answer is "yes".

I've tried simple rewrites that have not worked, so I'm open for some
suggestions.

Thanks, Chuck Rollins


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200903/1

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
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Options Yuvraj Excel Discussion (Misc queries) 0 June 29th 09 11:20 AM
Populate a cell if values in cell 1 and cell 2 match cell 3 and 4 [email protected] Excel Worksheet Functions 1 August 22nd 08 02:04 AM
Populate a cell if values in cell 1 and cell 2 match cell 3 and 4 [email protected] Excel Programming 1 August 21st 08 10:13 PM
NEED VBA TO SELECT A CELL; NOTE THE CELL VALUE;COPYADJ CELL;FIND CELL VALUE IN A RANGE AND SO ON CAPTGNVR Excel Programming 2 July 8th 07 04:18 PM
How to create/run "cell A equals Cell B put Cell C info in Cell D abmb161 Excel Discussion (Misc queries) 5 January 26th 06 06:36 PM


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

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"