N
Nico
Hi,
I have this weird problem.
I have written a function to calculate how many days, hours & minutes people
in my business work. In the VBA editor the function result is correct, but
when I go to Excel the function returns the wrong value.
The code below is where the problem lies:
Public Function AantalInTijd(Datum As Date, tijdformaat As Tijd) As LongIf
tijdformaat = Minuut Then
If tijdformaat = Minuut Then
AantalInTijd = Minute(Datum)
End If
End Function
Now when I check the value of AantalInTijd when it gets its value, it says
40. So when I exit the function, it has that value. Now when I go to
Excel(2003), the function has returned 9 instead of 40. Can anyone help me
with this?
Kind regards,
Nico.
I have this weird problem.
I have written a function to calculate how many days, hours & minutes people
in my business work. In the VBA editor the function result is correct, but
when I go to Excel the function returns the wrong value.
The code below is where the problem lies:
Public Function AantalInTijd(Datum As Date, tijdformaat As Tijd) As LongIf
tijdformaat = Minuut Then
If tijdformaat = Minuut Then
AantalInTijd = Minute(Datum)
End If
End Function
Now when I check the value of AantalInTijd when it gets its value, it says
40. So when I exit the function, it has that value. Now when I go to
Excel(2003), the function has returned 9 instead of 40. Can anyone help me
with this?
Kind regards,
Nico.