Let me start by saying I don't really have any idea what I'm doing with Macros. I'm somewhat excel savvy but this is a totally different ball game. I copy and pasted a formula from another thread from earlier and was really hoping I'd be able to use that method to achieve my end goal. My task is VERY simple. I just want to be able to click a cell and have a check box appear and the date and time appear next to it (I wanted the check and the date and time all in one cell, but hey beggars can't be choosers!). So for the first half of my day this formula was working:
However... I'm now getting this error:
error.PNG
I've attached the file so whoever is willing to take a crack at it can see what I'm shooting for. I appreciate the help!!
VBA Test.xlsm
PHP Code:
Option Explicit
Dim lrow As Long
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
lrow = Cells(Rows.Count, 1).End(xlDown).Row
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("B3:B" & lrow)) Is Nothing Then
Target.Font.Name = "Marlett"
If Target = vbNullString Then
Target = "b"
Else
Target = vbNullString
End If
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("B3:B" & lrow)) Is Nothing Then
If Target.Value = "b" Then
Target.Offset(0, 1).Value = Format(Now, "dd/mm/yy,hh:mm")
End If
End If
End Sub
error.PNG
I've attached the file so whoever is willing to take a crack at it can see what I'm shooting for. I appreciate the help!!
VBA Test.xlsm