![]() |
disable excell sheet cell from VB Script
Hai guys, i want to disable the cell(making user not to enter the data in particular cell) from VB Script(here i have to use VB Script becoz have to disable this cell based on som other conditions.). plz help me... Thanks & regards, Mahesh -- itsmahesh ----------------------------------------------------------------------- itsmaheshp's Profile: http://www.excelforum.com/member.php...fo&userid=1585 View this thread: http://www.excelforum.com/showthread.php?threadid=27354 |
disable excell sheet cell from VB Script
Hi
something like with activesheet ..unprotect ..range("A1").locked=true ..protect end with "itsmaheshp" wrote: Hai guys, i want to disable the cell(making user not to enter the data in a particular cell) from VB Script(here i have to use VB Script becoz i have to disable this cell based on som other conditions.). plz help me... Thanks & regards, Mahesh P -- itsmaheshp ------------------------------------------------------------------------ itsmaheshp's Profile: http://www.excelforum.com/member.php...o&userid=15859 View this thread: http://www.excelforum.com/showthread...hreadid=273541 |
disable excell sheet cell from VB Script
Here you are a solution:
If myCondition Then Range("A1").Select 'e.g. Selection.Locked = True ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True ' it locks all cells in the worksheet, so set .Locked = False for the non-disabled cells! 'or with password ActiveSheet.Protect Password:="myPassword", DrawingObjects:=True, Contents:=True, Scenarios:=True End If Regards Stefi €žitsmaheshp€ť ezt Ă*rta: Hai guys, i want to disable the cell(making user not to enter the data in a particular cell) from VB Script(here i have to use VB Script becoz i have to disable this cell based on som other conditions.). plz help me... Thanks & regards, Mahesh P -- itsmaheshp ------------------------------------------------------------------------ itsmaheshp's Profile: http://www.excelforum.com/member.php...o&userid=15859 View this thread: http://www.excelforum.com/showthread...hreadid=273541 |
All times are GMT +1. The time now is 05:59 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com