Select Case mistake
#3
(11-07-2022, 09:09 PM)Kernelpanic Wrote: A question about Select Case. The query should be: Case Is > 5500 but less than 7000

I just can't do it. I even got a compiler error with it.

[Image: Select-Case-Fehler2022-11-07.jpg]


Code: (Select All)
Select Case num
    Case 5001 To 6999
        'Do what you need to do
End Select

OR, another way to go about this type thing:

Code: (Select All)
For num = 1 To 100
    Select Case num
        Case Is >= 70 'Do nothing but elimate values > 70
        Case Is > 50 'Do what you need to do
            Print num,
    End Select
Next
Reply


Messages In This Thread
Select Case mistake - by Kernelpanic - 11-07-2022, 09:09 PM
RE: Select Case mistake - by mnrvovrfc - 11-07-2022, 09:19 PM
RE: Select Case mistake - by SMcNeill - 11-07-2022, 09:35 PM
RE: Select Case mistake - by SMcNeill - 11-07-2022, 09:29 PM
RE: Select Case mistake - by Pete - 11-07-2022, 09:41 PM
RE: Select Case mistake - by SMcNeill - 11-07-2022, 09:45 PM
RE: Select Case mistake - by Pete - 11-07-2022, 09:52 PM
RE: Select Case mistake - by mnrvovrfc - 11-07-2022, 10:14 PM
RE: Select Case mistake - by Pete - 11-07-2022, 10:20 PM
RE: Select Case mistake - by mnrvovrfc - 11-07-2022, 10:27 PM
RE: Select Case mistake - by Kernelpanic - 11-07-2022, 10:21 PM
RE: Select Case mistake - by Kernelpanic - 11-07-2022, 10:36 PM
RE: Select Case mistake - by Kernelpanic - 11-08-2022, 02:57 PM
RE: Select Case mistake - by Pete - 11-08-2022, 03:28 PM
RE: Select Case mistake - by SMcNeill - 11-08-2022, 03:58 PM
RE: Select Case mistake - by Pete - 11-08-2022, 04:17 PM
RE: Select Case mistake - by Kernelpanic - 11-08-2022, 04:21 PM
RE: Select Case mistake - by Pete - 11-08-2022, 04:28 PM
RE: Select Case mistake - by Kernelpanic - 11-08-2022, 04:28 PM



Users browsing this thread: 10 Guest(s)