hi!
here's am approxiamtion of the moon phase
0..3 is new moon.
4..7 full moon.
try this. not fully tested.
but please give me feed back .ok
<font face=Courier New><SPAN style="color:#00007F">Function</SPAN> Moon_Phase(y, m, d) <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Integer</SPAN>
<SPAN style="color:#00007F">If</SPAN> m < 3 <SPAN style="color:#00007F">Then</SPAN>
y = y - 1
m = m + 12
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">If</SPAN>
m = m + m
c = 365.25 * y
e = 30.6 * m
jd = c + e + d - 694039.09
jd = jd / 29.53
b = Int(jd)
jd = jd - b
b = Int(jd * 8 + 0.5)
<SPAN style="color:#00007F">If</SPAN> b = 8 <SPAN style="color:#00007F">Then</SPAN> b = 0
Moon_Phase = b
<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Function</SPAN></FONT>