Hello,
I don't understand how it works, can someone check my syntax. It does not give any error but it won't do what I expect :
data_date/data_time are a Date Type, date_start and time_start too.
When I have checked in the debug mode, the data_date and data_time has the same value and should go inside the if statement.
Thank you in advance.If data_date = date_start And data_time = time_start Then index_start = 10 End If
Last edited by oro77; 01-25-2012 at 08:07 PM. Reason: solved!
ok...
while in debug mode.. what is the value showing for date_start and time_start...
Condition says... if data_date equals date_start and data_time equals time_start.. then it will go inside the if statement.
Regards,
DILIPandey
<click on below 'star' if this helps>
DILIPandey
+919810929744
dilipandey@gmail.com
maybe...
If DateDiff("d", data_date , date_start )<0 and DateDiff("s", data_time , time_start )<0 then index_start = 10 End If
regards pike
If the solution helped please donate here to the RSPCA
Sites worth visiting;
J&R Solutions - royUK
AJP Excel Information - Andy Pope
Spreadsheet Toolbox
VBA for smarties - snb
@dilipandey The values are the same in the debug mode.
@pike Thank you very much, I did not know this function, it worked with :
If DateDiff("d", data_date , date_start )= 0 and DateDiff("n", data_time , time_start )= 0 then index_start = 10 End If
If you are satisfied with the solution(s) provided, please mark your thread as Solved.
How to mark a thread Solved
Go to the first post
Click edit
Click Go Advanced
Just below the word Title you will see a dropdown with the word No prefix.
Change to Solved
Click Save
regards pike
If the solution helped please donate here to the RSPCA
Sites worth visiting;
J&R Solutions - royUK
AJP Excel Information - Andy Pope
Spreadsheet Toolbox
VBA for smarties - snb
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks