Hello Excelgurus,
I am new to this forum and I am posting my 1question. I started using this forum from last few weeks and it's very useful for me for my MSExcel related projects.
I have some question related to this thread. I am using Checkmark and next right cell populated with date and timestamp with this code by creating a Module in VBA.So, Bs are my checkboxes column and Cs are Date & timestamp column.
But, when I uncheck the box the date & timestamp goes away, that's not what i want. I want to use the same condition for checkbox column as well (Just allow one time editable) tried with "Set CellsToLock = Intersect(Target, Range("B9:B20,C9:C20")) but its not working.
Its still allow me to check and uncheck more than one time...Can you please help me with that.
Thanks
Danny
Edit Mod : post related to https://www.excelguru.ca/forums/showthread.php?6988-One-time-permission-to-edit-cell-in-excel/page2 [/FONT]
I am new to this forum and I am posting my 1question. I started using this forum from last few weeks and it's very useful for me for my MSExcel related projects.
I have some question related to this thread. I am using Checkmark and next right cell populated with date and timestamp with this code by creating a Module in VBA.So, Bs are my checkboxes column and Cs are Date & timestamp column.
Code:
[FONT=Verdana]Sub CheckBox_Date_Stamp()[/FONT]
[FONT=Verdana]Dim xChk As CheckBox[/FONT]
[FONT=Verdana]Set xChk = ActiveSheet.CheckBoxes(Application.Caller)[/FONT]
[FONT=Verdana]With xChk.TopLeftCell.Offset(, 1)[/FONT]
[FONT=Verdana]If xChk.Value = xlOff Then[/FONT]
[FONT=Verdana].Value = ""[/FONT]
[FONT=Verdana]Else[/FONT]
[FONT=Verdana].Value = Date & " " & Time[/FONT]
[FONT=Verdana]End If[/FONT]
[FONT=Verdana]End With[/FONT]
[FONT=Verdana]End Sub[/FONT]
[FONT=Verdana]
Also, this works perfectly fine when clicking the checkbox and its populate the date & timestamp and will not allow me to edit it back. [/FONT]
[FONT=Verdana]Private Sub Worksheet_Change(ByVal Target As Range)[/FONT]
[FONT=Verdana]Me.Protect userinterfaceonly:=True, Password:="Pass123"[/FONT]
[FONT=Verdana]Set CellsToLock = Intersect(Target, Range("C9:C20"))[/FONT]
[FONT=Verdana]If Not CellsToLock Is Nothing Then[/FONT]
[FONT=Verdana] For Each cll In CellsToLock.Cells[/FONT]
[FONT=Verdana] cll.Locked = True[/FONT]
[FONT=Verdana] Next cll[/FONT]
[FONT=Verdana]End If[/FONT]
[FONT=Verdana]End Sub
Its still allow me to check and uncheck more than one time...Can you please help me with that.
Thanks
Danny
Edit Mod : post related to https://www.excelguru.ca/forums/showthread.php?6988-One-time-permission-to-edit-cell-in-excel/page2 [/FONT]
Last edited by a moderator: