nithin shettigar
New Member
- Joined
- Mar 16, 2014
- Messages
- 44
Please help me out with VBA code, if I enter “ok” any ware betweenE1:E500 entire row should be protected.
Eg – If I enter ok in “E2” then “A2:D2” should be protected
[TABLE="width: 377"]
<colgroup><col width="26" style="width: 20pt; mso-width-source: userset; mso-width-alt: 950;"><colgroup><col width="84" style="width: 63pt; mso-width-source: userset; mso-width-alt: 3072;"><colgroup><col width="64" style="width: 48pt;"><colgroup><col width="75" style="width: 56pt; mso-width-source: userset; mso-width-alt: 2742;" span="2"><colgroup><col width="64" style="width: 48pt;"><colgroup><col width="115" style="width: 86pt; mso-width-source: userset; mso-width-alt: 4205;"><tbody>[TR]
[TD="width: 26, bgcolor: transparent"] [/TD]
[TD="width: 84, bgcolor: transparent, align: center"]A[/TD]
[TD="width: 64, bgcolor: transparent, align: center"]B[/TD]
[TD="width: 75, bgcolor: transparent, align: center"]C[/TD]
[TD="width: 75, bgcolor: transparent, align: center"]D[/TD]
[TD="width: 64, bgcolor: transparent, align: center"]E[/TD]
[TD="width: 115, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: center"]1[/TD]
[TD="bgcolor: transparent, align: center"]Name[/TD]
[TD="bgcolor: transparent, align: center"]Place [/TD]
[TD="bgcolor: transparent, align: center"]Date[/TD]
[TD="bgcolor: transparent, align: center"]Time[/TD]
[TD="bgcolor: transparent, align: center"]Remark[/TD]
[TD="bgcolor: transparent, align: center"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: center"]2[/TD]
[TD="bgcolor: transparent, align: center"]Suhan[/TD]
[TD="bgcolor: transparent, align: center"]Dubai[/TD]
[TD="bgcolor: transparent, align: center"]15/01/2019[/TD]
[TD="bgcolor: transparent, align: center"]11:57 PM[/TD]
[TD="bgcolor: transparent, align: center"]ok[/TD]
[TD="bgcolor: transparent, align: center"]protect row[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: center"]3[/TD]
[TD="bgcolor: transparent, align: center"]Nithin[/TD]
[TD="bgcolor: transparent, align: center"]Dubai[/TD]
[TD="bgcolor: transparent, align: center"] [/TD]
[TD="bgcolor: transparent, align: center"] [/TD]
[TD="bgcolor: transparent, align: center"]
[/TD]
[TD="bgcolor: transparent, align: center"]unprotect row[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: center"]4[/TD]
[TD="bgcolor: transparent, align: center"]Yash[/TD]
[TD="bgcolor: transparent, align: center"]Dubai[/TD]
[TD="bgcolor: transparent, align: center"]15/01/2019[/TD]
[TD="bgcolor: transparent, align: center"]12:57 PM[/TD]
[TD="bgcolor: transparent, align: center"]ok[/TD]
[TD="bgcolor: transparent, align: center"]protect row[/TD]
[/TR]
</tbody>[/TABLE]
Eg – If I enter ok in “E2” then “A2:D2” should be protected
[TABLE="width: 377"]
<colgroup><col width="26" style="width: 20pt; mso-width-source: userset; mso-width-alt: 950;"><colgroup><col width="84" style="width: 63pt; mso-width-source: userset; mso-width-alt: 3072;"><colgroup><col width="64" style="width: 48pt;"><colgroup><col width="75" style="width: 56pt; mso-width-source: userset; mso-width-alt: 2742;" span="2"><colgroup><col width="64" style="width: 48pt;"><colgroup><col width="115" style="width: 86pt; mso-width-source: userset; mso-width-alt: 4205;"><tbody>[TR]
[TD="width: 26, bgcolor: transparent"] [/TD]
[TD="width: 84, bgcolor: transparent, align: center"]A[/TD]
[TD="width: 64, bgcolor: transparent, align: center"]B[/TD]
[TD="width: 75, bgcolor: transparent, align: center"]C[/TD]
[TD="width: 75, bgcolor: transparent, align: center"]D[/TD]
[TD="width: 64, bgcolor: transparent, align: center"]E[/TD]
[TD="width: 115, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: center"]1[/TD]
[TD="bgcolor: transparent, align: center"]Name[/TD]
[TD="bgcolor: transparent, align: center"]Place [/TD]
[TD="bgcolor: transparent, align: center"]Date[/TD]
[TD="bgcolor: transparent, align: center"]Time[/TD]
[TD="bgcolor: transparent, align: center"]Remark[/TD]
[TD="bgcolor: transparent, align: center"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: center"]2[/TD]
[TD="bgcolor: transparent, align: center"]Suhan[/TD]
[TD="bgcolor: transparent, align: center"]Dubai[/TD]
[TD="bgcolor: transparent, align: center"]15/01/2019[/TD]
[TD="bgcolor: transparent, align: center"]11:57 PM[/TD]
[TD="bgcolor: transparent, align: center"]ok[/TD]
[TD="bgcolor: transparent, align: center"]protect row[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: center"]3[/TD]
[TD="bgcolor: transparent, align: center"]Nithin[/TD]
[TD="bgcolor: transparent, align: center"]Dubai[/TD]
[TD="bgcolor: transparent, align: center"] [/TD]
[TD="bgcolor: transparent, align: center"] [/TD]
[TD="bgcolor: transparent, align: center"]
[/TD]
[TD="bgcolor: transparent, align: center"]unprotect row[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, align: center"]4[/TD]
[TD="bgcolor: transparent, align: center"]Yash[/TD]
[TD="bgcolor: transparent, align: center"]Dubai[/TD]
[TD="bgcolor: transparent, align: center"]15/01/2019[/TD]
[TD="bgcolor: transparent, align: center"]12:57 PM[/TD]
[TD="bgcolor: transparent, align: center"]ok[/TD]
[TD="bgcolor: transparent, align: center"]protect row[/TD]
[/TR]
</tbody>[/TABLE]