Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
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


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
disable Compatibility Mode in Vista for Excell bad vista Excel Discussion (Misc queries) 1 August 18th 08 06:38 PM
How can I disable all Hyperlinks in Excell 2000 penguino18 Excel Discussion (Misc queries) 1 January 8th 06 04:13 PM
insert query into excell sheet to update excell sheet and pivot table vbsolo Excel Discussion (Misc queries) 0 August 24th 05 12:41 PM
Excell:Move from any Cell Sheet 1 to any cell Sheet 2 etc. eldo Excel Worksheet Functions 1 August 16th 05 09:17 AM
can i register a digit in excell sheet cell Mr: beba Excel Discussion (Misc queries) 1 May 24th 05 10:43 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"