Hi all
VB Code:
Public Sub convert(AA, OBUF) ' A small routine to convert fractional hrs to hrs:min ' Pass 0 into output if time is < 0 If (AA < 0) Or (AA > 24) Then OBUF(1) = 99 OBUF(2) = 99 Else ' Pass hrs into OBUF(1) and mins into OBUF(2) OBUF(1) = Int(AA) OBUF(2) = Int(60 * (AA - CDbl(OBUF(1)))) End If End Sub
What I want this code to do is if AA < 0 Or AA > 24 then
OBUF(1) to = "**" instead of 99
OBUF(2) to = "**" instead of 99
Any help appriciated.
Ed
