Hi guys,
I need your help to fix the following my VBA Code:
If function is allowed between 4.00 PM until 5 PM. However, the code doesn't work. My PC is setting as Indonesian in Language option and Bangkok-Hanoi-Jakarta for date and time.
Any help and suggestion, would be appreciate
[VBA]Sub Submission()
Dim CurrDate As Date
Dim CrTime As String
CurrDate = Format(Now, "Short Time")
If CurrDate <= #3:59:00 PM# And CurrDate >= #5:01:00 PM# Then
MsgBox "You can't allowed at this time," & vbCr _
& "Please try between 4 PM until 5 PM !!", vbOKOnly, "System Alert.."
Else
Call SaveUserButton
End If
End Sub[/VBA]