If between two numbers

Fox

Active Member
Licensed User
Longtime User
How can i make an if statement between to numbers... I mean if i have an number for example 6 and would say if the calculatet number is between 6.0 and 7.0 then... how can i code this...
 

Cableguy

Expert
Licensed User
Longtime User
you can use : if x>6.0 or x<7.1 then
 
Upvote 0

Fox

Active Member
Licensed User
Longtime User

hmmm this works not at me:

If lbl_hc.Text <= 6 Then
ImageView1.Bitmap = LoadBitmap(File.DirAssets, "en.png")
Else If lbl_hc.Text >= 6 AND <= 7 Then
ImageView1.Bitmap = LoadBitmap(File.DirAssets, "au.png")
Else If lbl_hc.Text >= 7 AND <= 9 Then
ImageView1.Bitmap = LoadBitmap(File.DirAssets, "la.png")
Else If lbl_hc.Text >= 9 AND <= 20 Then
ImageView1.Bitmap = LoadBitmap(File.DirAssets, "ot.png")
End If

gets me follow error:
Compiling code. Error
Error compiling program.
Error description: Missing parameter.
Occurred on line: 630
Else If lbl_hc.Text >= 6 AND <= 7 Then
Word: and
 
Upvote 0

Fox

Active Member
Licensed User
Longtime User

ohhh that works thank you ... ahhh first i have make it then not... ohhh the error with an simple logic error...
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…