Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Does anyone know how I could create a checkbox that when checked, would lock
all cells on that column permanently. Probably some simple macro that keeps eluding me. |
#2
![]() |
|||
|
|||
![]()
Put a checkbox from the Forms toolbar in row 1 of each of the columns you want.
Then assign this same macro to each of those checkboxes. Option Explicit Sub testme() Dim myCBX As CheckBox Set myCBX = ActiveSheet.CheckBoxes(Application.Caller) If myCBX.Value = xlOn Then ActiveSheet.Unprotect Password:="hi" myCBX.TopLeftCell.EntireColumn.Locked = True ActiveSheet.Protect Password:="hi" End If End Sub Be aware that worksheet protection is very weak. It can be broke very simply. JasonMiller wrote: Does anyone know how I could create a checkbox that when checked, would lock all cells on that column permanently. Probably some simple macro that keeps eluding me. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
HELP: Last row of the column containing blank cells between non-blank cells | Excel Worksheet Functions | |||
Count Position of Filtered TEXT cells in a column | Excel Worksheet Functions | |||
Count cells in a column that contain dates | New Users to Excel | |||
how can I take 3 cells and move them to a different column into 1 | Excel Discussion (Misc queries) | |||
calculate which cells in column A will give me the total of column | Excel Worksheet Functions |