Case statement with a range of integers
As I indicated in my post, I'll be one of the first to admit that VB's help files can be
somewhat inhospitable; however, in this case, you would have been pleasantly surprised had
you tried. In the future, you (and anyone else out there like Bill) should try the help
files first. Then, if you can't find what you are looking for, post to this or one of the
other VB newsgroups. Just tells us that you tried to use the help files first, but to no
avail and I, or someone else, will then be happy to try and help you. I just want to know
that the finding the answer to your question is as important to you as you are asking it
to become to those of us who volunteer here.
Rick
Quote:
> Since I'm the original "culprit" here I thought I should respond. Yes I
> should have read the help file before asking for help, but I also have found
> the VB help files pretty hard to use. In any event, I'll try to use them
> whenever possible, and I do appreciate the response of all, even Rick.
> Bill
> > How can a range of values be tested in a case statement, for example:
> > case mvarTestInteger
> > case between 1 and 5
> > ' some code
> > case else
> > ' some code
> > end select
> > I'm getting an error message that only >= etc can be used, rather than
> > between. The only option I've thought of is a series of if then else
> > statements, but this is not as clean as a case statement.
> > Bill