Textbox problem
Dim i As Long
Dim j As Long
Dim tmp As String
Dim fSorted As Boolean
For i = 1 To 5
For j = i + 1 To 6
If DateValue(Me.Controls("TextBox" & i).Text) _
DateValue(Me.Controls("TextBox" & j).Text) _
or me.Controls("TextBox" & i).Text = '' Then
tmp = Me.Controls("TextBox" & i).Text
Me.Controls("TextBox" & i).Text = _
Me.Controls("TextBox" &j).Text
Me.Controls("TextBox" & j).Text = tmp
End If
Next j
Next i
Should cause blank values to move to the higher numbered boxes.
--
Regards,
Tom Ogilvy
"Robert Couchman" wrote in message
...
Hello Bob,
thankyou for the help with the sorting, but i seem to have
a slight problem.
because not all the cells have times in, when they are
sorted, the blank spaces move to the top, so any data is
in the last few textboxes.
any ideas of how to solve this problem?
thank you,
Robert Couchman
)
|