Checkbox for Time stamp and Lock cells

Ashwathmv

New Member
Joined
Jan 12, 2019
Messages
4
Hi,

I am looking for a help to create the checkbox. In the spreadheet column A1 to E1 has to be updated manually. Once the data is updated, i am looking to have a checkbox created in F column, if i tick the check box, first requirement is

1) cell A1 To E1 should get locked
2) in cell G1 tike stamp to be appeared
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
.
Use an ActiveX Checkbox control in F1.

Paste this in the Sheet1 module :

Code:
Option Explicit


Private Sub CheckBox1_Click()
    If CheckBox1.Value = True Then
        Sheets("Sheet1").Range("A1:E1").Locked = True
        Sheets("Sheet1").Range("G1").Value = Now
        Worksheets("Sheet1").Protect
    ElseIf CheckBox1.Value = False Then
        Worksheets("Sheet1").Unprotect
        Sheets("Sheet1").Range("A1:E1").Locked = False
        Sheets("Sheet1").Range("G1").Value = ""
    End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,155
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top