P
pol
Please execuse me for resposting the same question again. I afraid the
previous question will give correct result.
I want to write a macros for the following program steps. from there I can
find out the number of offdays of each employee
Date l_dat_tart = ’01-Jan-2009’
Date l_dat_to = ’31-12-2009’
Int li_sat
DO WHILsE l_dat_tart <= l_dat_to
ls_day = dayname(l_dat_start)
Choose Case ls_day
Case ‘Saturday’
li_sat = li_sat+ 1
if Range("Q3").Value = 1 and li_sat= 1 then
li_sat= li_sat+ 1
end if
if Range("Q3").Value = 2 and li_sat= 2 then
li_sat= li_sat+ 1
end if
if Range("Q3").Value = 3 and li_sat= 3 then
li_sat= li_sat+ 1
end if
l_dat_start= l_dat_start + 1
LOOP
With thanks
Pol
previous question will give correct result.
I want to write a macros for the following program steps. from there I can
find out the number of offdays of each employee
Date l_dat_tart = ’01-Jan-2009’
Date l_dat_to = ’31-12-2009’
Int li_sat
DO WHILsE l_dat_tart <= l_dat_to
ls_day = dayname(l_dat_start)
Choose Case ls_day
Case ‘Saturday’
li_sat = li_sat+ 1
if Range("Q3").Value = 1 and li_sat= 1 then
li_sat= li_sat+ 1
end if
if Range("Q3").Value = 2 and li_sat= 2 then
li_sat= li_sat+ 1
end if
if Range("Q3").Value = 3 and li_sat= 3 then
li_sat= li_sat+ 1
end if
l_dat_start= l_dat_start + 1
LOOP
With thanks
Pol