Index problem in the IF statement

Discussion in 'Questions (Windows Mobile)' started by markus, Jun 3, 2007.

  1. markus

    markus Member Licensed User

    Hi all,

    I have a problem with the following statements.
    Code:
    [FONT="Courier New"]Sub btnRechnen_Click
         
    IF label5.text="......" then
            
    MsgBox("Standort auswählen")
         
    Else if
            
    for i=0 to Table1.RowCount-1
            ……………
            …………[/
    FONT]
    Is the value of label5.text=”......” the program works fine.
    Is there an other value in label5.text (in my case a numeric value)
    the program stops.

    any idea?

    thnx for your help
    Markus
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You should use Else instead of Else If (as you didn't use a condition):
    IF label5.text="......" then
    MsgBox("Standort auswählen")
    Else
    for i=0 to Table1.RowCount-1
    ……………
    …………
     
  3. markus

    markus Member Licensed User

    Hi Erel

    yes, yes, mh…….. i should know this…, sorry.

    Thanks a lot for your help

    Regard
    Markus
     
Loading...