disabling cells based on cmd button

  • Thread starter Thread starter Consuelo
  • Start date Start date
C

Consuelo

HELLO,
I AM TRYING TO FIGURE OUT HOW TO MAKE CERTAIN CELLS
DISABLED BASED ON AN CMD BUTTON'S (ON USER FORM) ONCLICK
EVENT. PLEASE HELP!
CONSUELO :-)
 
Nor sure if I understand you correct?
But try this

Private Sub CommandButton1_Click()
Sheets("sheet1").Unprotect
Sheets("sheet1").Range("a1:c1").Locked = True
Sheets("sheet1").Protect
End Sub
 
Back
Top