ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   disabling cells based on cmd button (https://www.excelbanter.com/excel-programming/277597-disabling-cells-based-cmd-button.html)

Consuelo

disabling cells based on cmd button
 
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 :-)



Ron de Bruin

disabling cells based on cmd button
 
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


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Consuelo" wrote in message ...
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 :-)






All times are GMT +1. The time now is 08:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com