Hello everyone, I have a VBA code which is very simple, but still it's not working as it should be, so i think there is little bug in code, pls help to find it out
Requirement:-
If cell value is 0 or time is less than 15:29:00
than do nothing
else, 'Main code ll be run in this case'
My code:-
Any help ll be appriciated
Requirement:-
If cell value is 0 or time is less than 15:29:00
than do nothing
else, 'Main code ll be run in this case'
My code:-
VBA Code:
Dim LTime As Date
Sheets("AD").Select
If Range("J2").Value = 0 Or LTime < "15:29:00" Then
Range("K3").Select
Else
Sheets("AD").Select
Range("J2:AF3").Select
Selection.Copy
Range("J6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("J6").Select
End If
Any help ll be appriciated