Results 1 to 8 of 8

Thread: coding prob ***resolved***

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2004
    Posts
    100

    coding prob ***resolved***

    i have five values to be compared with a value.
    the five values must be greater than some value.
    if the 5 values are less than that,
    the system will count how many of them are less than
    the value.
    the count value will be displayed in a label.
    my prob is the count value will always return 0 value even though
    there is a lesser value .
    why is that??
    i'm new in vb programming, so anyone here could help me
    fixing the coding below.
    thank u in advance

    VB Code:
    1. bb = 0
    2. If Val(Label98.Caption) < Val(Label110.Caption) Then
    3.     bb = bb + 1
    4.    
    5. ElseIf Val(Label99.Caption) < Val(Label110.Caption) Then
    6.    bb = bb + 1
    7.    
    8. ElseIf Val(Label100.Caption) < Val(Label110.Caption) Then
    9.     bb = bb + 1
    10.    
    11. ElseIf Val(Label102.Caption) < Val(Label110.Caption) Then
    12.    
    13.     bb = bb + 1
    14. ElseIf Val(Label101.Caption) < Val(Labe110.Caption) Then
    15.    
    16.     bb = bb + 1
    17. End If
    18. Label33.Caption = bb
    Last edited by azrina; Feb 12th, 2004 at 04:13 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width