View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default 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