Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disabled cells in excel

Status
Not open for further replies.

olatzcelaya

Programmer
Jan 4, 2008
13
GB
Hi all,

I am writing a program in Visual Basic for Applications and I want to disable some excel cells, regarding a condition in the code. Could anybody tell me which is the reference that I should use to get this??The code is the following one and I want to enable and disable the cells (13,10) of the sheet 1. Any help will be appreciated.



Private Sub ComboBox5_Click()
Dim e As Integer
If ComboBox5.Text = "YES" Then
e = 0
' The customer decides the type of pallet to use

CommandButton3.Enabled = True
CommandButton4.Enabled = True


ElseIf ComboBox5.Text = "NO" Then
e = 1
' We decide the type of pallet to use. The cells of pallet width and pallet length are disabled

CommandButton3.Enabled = False
CommandButton4.Enabled = False

End If
End Sub


THANK YOU :)

OLATZ
 




You cannot disable cells.

You can however, both LOCK cells and PROTECT the sheet.

Check out the Locked property of a range and the Protect property of a worksheet.

Skip,
[sub]
[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top