NatetheGreat
Active Member
- Joined
- Nov 18, 2013
- Messages
- 268
Hi I have the following code.
For some reason the VBE here is firing NO, even though the value of dataarray(1,1) is equal to 01/04/2014 and the value of datekeyarray(1,1) is equal to 02/09/2013. Obviously 02/09/2013 is before 01/04/2013, so I am not sure why this is flagging no?
Thanks
Natethegreat
Code:
Option ExplicitSub pull()
Dim date1 As String
Dim datekeyArray() As Variant
Dim dataArray() As Variant
Sheets(2).Select
datekeyArray = Range("a2:c14")
Sheets(1).Select
dataArray = Range("a2:r6771")
If dataArray(1, 1) > datekeyArray(1, 1) Then
MsgBox ("yes")
Else: MsgBox ("no")
End If
End Sub
For some reason the VBE here is firing NO, even though the value of dataarray(1,1) is equal to 01/04/2014 and the value of datekeyarray(1,1) is equal to 02/09/2013. Obviously 02/09/2013 is before 01/04/2013, so I am not sure why this is flagging no?
Thanks
Natethegreat