Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help about > and <

Status
Not open for further replies.

theCroat

Technical User
Sep 27, 2006
20
HR
Hello there, as i posted previously, i have lblID.caption where are ID's displayed, what i want to do is this:
if lblID.caption is lower than 100 then do process1
if lblID.caption is higher than 100 and lower than 200 then do process1...

hope someone understand this and can help, thank you!

 
select case cint(lblID.caption)
case < 100
'process1
case 100 to 200
'process2
end select

* not tested
 
ok here is the thing, it all works untill it goes to higher numbers...
Case 10022 To 100206
MsgBox "net"
End Select

gives RUNTIME ERROR 6 OVERFLOW

help :)
 
Do yourself a favor and NEVER use integers. They max out at approx. 32,000. Instead, use longs.

Change:
select case cint(lblID.caption)

To:
select case [!]CLNG[/!](lblID.caption)

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
God bless you, thanks i've finished my project :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top