I am using vlookup to return a date from my spreadsheet. I have tried to convert the date to Long by using CLng & CDate in my code, but I am still getting a type mismatch error.
Here is my code:
Any advice would be appreciated.
Here is my code:
Code:
Private Sub TextBox9_Change()
Dim wsJournal As Worksheet
Dim MyDate As Long
Set wsJournal = Worksheets("Journal")
MyDate = CLng(CDate(Me.tbDate.Value))
MyDate = Application.VLookup(Me.tbPeriod, [YrDte], 1, False)
End Sub
Any advice would be appreciated.