oh... ok I think I fixed that. I separated the Dim hrs, min, secs As Integer (shown below) and it now says that hrs = 0 when I hover
new question:
Why would it say "hrs = Int(in_Seconds / 3600) = <Automation Error>"
when I hover over hrs = Int(in_Seconds / 3600)?
Current code is:
Function getMinuteFormat(in_Seconds) As String
' converts numeric seconds (in_Seconds) into a string that displays hours, minutes and seconds (i.e. 340 = "5:40:25")
Dim ret As String ' variable to hold value to be returned, by default
Dim hrs As Integer
Dim mins As Integer
Dim secs As Integer ' variables to hold hours, minutes and seconds
ret = "00:00" ' default value to return
If (IsNull(in_Seconds) = False) Then
hrs = Int(in_Seconds / 3600)
mins = IIf((in_Seconds Mod 60) = 0, (in_Seconds / 60) Mod 60, Fix(in_Seconds / 60) Mod 60)
secs = in_Seconds Mod 60
End If
' determines how many whole hours and whole minutes are in in_Seconds, and how many remaining seconds
ret = hrs & ":" & Format(mins, "00") & ":" & Format(secs, "00")
getMinuteFormat = ret
End Function