ramedju
New Member
- Joined
- Jan 27, 2016
- Messages
- 10
Hi guys!
Anyone know how to compare the input time and current time in excel VBA ?
This is my code Snippet
This always returns 'Good Afternoon' and it is my problem. Is there's something lacking or anything?
Any help is highly appreciated!
Thank you so much!
Anyone know how to compare the input time and current time in excel VBA ?
This is my code Snippet
Code:
time = "11:59:59 AM"
If Format(TimeValue(Now)) <= time Then
test = "Good morning!"
Else
test = "Good Afternoon!"
End If
This always returns 'Good Afternoon' and it is my problem. Is there's something lacking or anything?
Any help is highly appreciated!
Thank you so much!