Hi all

VB Code:
  1. Public Sub convert(AA, OBUF)
  2.  
  3. ' A small routine to convert fractional hrs to hrs:min
  4.  
  5. '  Pass 0 into output if time is < 0
  6.  
  7. If (AA < 0) Or (AA > 24) Then
  8.  
  9.   OBUF(1) = 99
  10.   OBUF(2) = 99
  11.  
  12. Else
  13.  
  14. '  Pass hrs into OBUF(1) and mins into OBUF(2)
  15.  
  16.  OBUF(1) = Int(AA)
  17.  OBUF(2) = Int(60 * (AA - CDbl(OBUF(1))))
  18.  
  19. End If
  20.  
  21. 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