i'm trying to write a function that when passed a date will return the date of the next tuesday
my code below is not working -can someone help
function getnexttuesday(mydate)
iDay = weekday(mydate)
if iday>2 then mydate=mydate+6
iDay = weekday(mydate)
for i=iday to 3
mydate=mydate+1
if weekday(mydate)=3 then exit for
next
end function
my code below is not working -can someone help
function getnexttuesday(mydate)
iDay = weekday(mydate)
if iday>2 then mydate=mydate+6
iDay = weekday(mydate)
for i=iday to 3
mydate=mydate+1
if weekday(mydate)=3 then exit for
next
end function