Hi all,
I have code which I am trying to use to update a cell with a revised 'date of birth'. The VBA fires on AfterUpdate event of a field called DOB on a userform.
Private Sub DOB_AfterUpdate()
Dim Res As Long
Res = Application.Match(CTOID, Sheets("TreatmentOrders").Range("A:A"), 0)
MsgBox "Res = " & Res
If Not IsError(Res) Then
Sheets("TreatmentOrders").Range("D" & Res).Value = Me.DOB.Value
MsgBox "Updated DOB"
End If
'Me.DOB = Format(Me.DOB, "d mmmm yyyy")
'Me.NewCTODate.SetFocus
End Sub
Problem is, I am getting error 13 Type Mismatch on the second line.
Any clues anyone?
cheers
Pete
Bookmarks