Hi Mark,
The problem is in your syntax. The Select....Case structure compares the
Select expression with each case expression ie: what your syntax is doing is
testing "If ChkBxs = (ChkBxs = VisRows)".
There are 2 ways of using the Select...Case to achieve what you are after
here. The most obvious one would be to
Select Case ChkBxs
Case VisRows
Case Is < VisRows
Case Is > VisRows
End Select
The other option could possibly be like this:
Select Case true
Case ChkBxs = VisRows
Case ChkBxs < VisRows
Case ChkBxs > VisRows
End Select
Regards,
Mick
Quote:
> Help, why does my select case keep pulling CASE ELSE even when the values
in
> my
> variables are set.
> Note. Check() is an array of check boxes
> ///---Begin Code
> VisRows = form.dgDataGrid.VisibleRows
> ChkBxs = form.Check().Count
> Select Case ChkBxs
> Case ChkBxs = VisRows
> Case ChkBxs < VisRows
> Case ChkBxs > VisRows
> Case Else
> End Select
> ///---End Code