Hello to all,
I'm new to VBA but can understand some.
I need help regarding locking/protecting the active sheet when the value on cell matches my required value.
For example,
The value will appear on column D. If a value appear on D is "REJECT" the active sheet will become protected.
But before the value on D appear, it must satisfy the condition on column B and C. Cells on column B and C are under formula as well as column D.
The data on column B is dependent on column A1 and data on column C is dependent on A2.
Pls see below
[TABLE="width: 417, align: left"]
<tbody>[TR]
[TD]
[/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]1
[/TD]
[TD]OK
[/TD]
[TD]OK
[/TD]
[TD]ACCEPT
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]1
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]1
[/TD]
[TD]OK
[/TD]
[TD]NG
[/TD]
[TD]REJECT
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]2
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[/TR]
</tbody>[/TABLE]
Data on column A are from scanner, so I need to finish scanning to have data on column B and C and to have data on column D.
Thanks in advance for any help you could give me.
I'm new to VBA but can understand some.
I need help regarding locking/protecting the active sheet when the value on cell matches my required value.
For example,
The value will appear on column D. If a value appear on D is "REJECT" the active sheet will become protected.
But before the value on D appear, it must satisfy the condition on column B and C. Cells on column B and C are under formula as well as column D.
The data on column B is dependent on column A1 and data on column C is dependent on A2.
Pls see below
[TABLE="width: 417, align: left"]
<tbody>[TR]
[TD]
[/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]1
[/TD]
[TD]OK
[/TD]
[TD]OK
[/TD]
[TD]ACCEPT
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]1
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]1
[/TD]
[TD]OK
[/TD]
[TD]NG
[/TD]
[TD]REJECT
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]2
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[TD]
[/TD]
[/TR]
</tbody>[/TABLE]
Data on column A are from scanner, so I need to finish scanning to have data on column B and C and to have data on column D.
Thanks in advance for any help you could give me.