Hello,

I am currently working on a vba code to loop through a list of cells, A6:60, but I have been unable to get my code to validate if the cells in this range are between or equal to the data entered by the user in a textbox. I have found that if do not attempt this, the rest of the code works perfectly fine, as such I have only included the basis that I have been having issues with.

My current code is as follows:

If Datetxt ">=" dtStart And Datetxt "<=" dtEnd Then
'Here I have entered data that will send the data to its separate sheet
else
MsgBox "The data has been tranfered to the worksheet 'Summary'."
End If

'The cells will continue going up here through code until a blank cell is past and the list is through
If IsEmpty(ActiveCell.Value) Then
MsgBox " I'm sorry, there was no job found on that date."
End If


' the value of Datetxt = the activecell.value



I have been working on this problem for days and have been unable to fix it. And it must be in VBA.
Any and all assistance on this would be greatly appreciated!

Sincerely,
Rebecca