I am using Reflections VBA but I think this is a general question in nature. Here is the code I am having problem's with:
If btnQTD Then
temp = Round(3.5) <-------- problem is this line here
thisweek = CInt(DateDiff("w", DateSerial(Year(Now()), 1, 1), Now(), vbSunday) / (1)) + 1
QtrStart = DateSerial(Year(Now()), 1, 1) + 7 - WeekDay(DateSerial(Year(Now()), 1, 1), 1) + (13 * 7)
End If
I am trying to find the starting day of the fiscal quarter based on an accouting calendar.
According to the object browser, "Round" and "RoundUp" are Excel functions. I have referenced the Microsoft Excel 9.0 Object Library. However, when I compile the program, I get a "Sub or Function not defined" error for the formula "Round(xx)".
Can anyone explain what I am doing wrong?
thanks
c2
San Jose, CA Craig Canter
Cost Accountant
Sipex
Milpitas, CA
If btnQTD Then
temp = Round(3.5) <-------- problem is this line here
thisweek = CInt(DateDiff("w", DateSerial(Year(Now()), 1, 1), Now(), vbSunday) / (1)) + 1
QtrStart = DateSerial(Year(Now()), 1, 1) + 7 - WeekDay(DateSerial(Year(Now()), 1, 1), 1) + (13 * 7)
End If
I am trying to find the starting day of the fiscal quarter based on an accouting calendar.
According to the object browser, "Round" and "RoundUp" are Excel functions. I have referenced the Microsoft Excel 9.0 Object Library. However, when I compile the program, I get a "Sub or Function not defined" error for the formula "Round(xx)".
Can anyone explain what I am doing wrong?
thanks
c2
San Jose, CA Craig Canter
Cost Accountant
Sipex
Milpitas, CA