Re: rediming an array with non selected values

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Peter Foti (peter_at_Idontwantnostinkingemailfromyou.com)
Date: 03/24/04


Date: Wed, 24 Mar 2004 10:26:51 -0500


"Peter Rooney" <peter@whoba.co.uk> wrote in message
news:%23s%23YRhaEEHA.2576@TK2MSFTNGP11.phx.gbl...
> If LastHour <> 0 Then
> TimeQuery = TimeQuery & "(time>" & LastHour & " & "
> End If
>
> The LastHour containing the array, so 02 become 2, I have tied to find a
> fumction that will maintain the zero but to no avail, any ideas on how
> to get around it, this is using VBscript

Will this work?

' Do you regular assignment to LastHour, then follow it with this
LastHour = Right("0" & LastHour,2)
If LastHour <> 0 Then
   TimeQuery = TimeQuery & "(time>" & LastHour & " & "
End If

Regards,
Peter Foti