VLookup problem...help pls...urgent

Joined
Jun 23, 2005
Messages
3
Reaction score
0
Hi,

I have wriiten the following code.

Private Sub btnPastCommentsActivityList1_Click()
Dim dt As Date

dt = txtOldDateOfEntryMonth1.Value + "-" + txtOldDateOfEntryDay1.Value + "-" + txtOldDateOfEntryYear1.Value
'dt = Format(dt, "dd/mm/yyyy")
MsgBox dt
ActiveWorkbook.Sheets("Activity_Database").Activate
Range("B6").Select

txtOldComments.Value = Application.VLookup(cmbInitiativeDescription.Value, Range("C6:Z9999"), 18, False) And Application.VLookup(dt, Range("B6:Z9999"), 18, False)
End Sub


I have got three columns. One in C6 and thle Other in B6. What i want to do is assign the txtOldComments.Value with some data in the third column which satisfies cmbInitiativeDescription.Value and dt (date).

However, I get the following error, "type mismatch". How do i solve it.

I hope someone can help me thanx. Its urgent
 
Back
Top