Message 1 of 3
Select Case Problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a problem with select case that I hope somebody can help me with.
I have a variable "NumberOfEntities"
If the Counter is 1 then one thing happens
If the Counter is greater than 1 but less than NumberOfEntities then another thing happens
and finally.....
If the counter is equal to the NumberOfEntities then I want the programme to do something else
But I cannot get the programme to work.
Can anybody help?
Here is my code.......
NumberOfEntities = 7
For Counter = 1 To NumberOfEntities
Select Case Counter
Case 1
MsgBox Counter, 64, "Counter is 1"
Case Is > 1 And Counter < NumberOfEntities
MsgBox Counter, 64, "Counter is greater than 1 but less than NumberOfEntities"
Case Is = NumberOfEntities
MsgBox Counter, 64, "Counter is equal to the NumberOfEntities"
End Select
Next
Kind Regards
Darren
I have a variable "NumberOfEntities"
If the Counter is 1 then one thing happens
If the Counter is greater than 1 but less than NumberOfEntities then another thing happens
and finally.....
If the counter is equal to the NumberOfEntities then I want the programme to do something else
But I cannot get the programme to work.
Can anybody help?
Here is my code.......
NumberOfEntities = 7
For Counter = 1 To NumberOfEntities
Select Case Counter
Case 1
MsgBox Counter, 64, "Counter is 1"
Case Is > 1 And Counter < NumberOfEntities
MsgBox Counter, 64, "Counter is greater than 1 but less than NumberOfEntities"
Case Is = NumberOfEntities
MsgBox Counter, 64, "Counter is equal to the NumberOfEntities"
End Select
Next
Kind Regards
Darren