Results 1 to 8 of 8

Thread: [RESOLVED] Block if without end if

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2011
    Posts
    53

    Resolved [RESOLVED] Block if without end if

    Hi friends,

    I receive the same error message which is "Block if without end if"

    If you tell the where the mistake is, it will be perfect for me.
    I have been dealing with this problem for hours
    vb Code:
    1. If kategori2 = "" And kategori3 = "" And kategori4 = "" Then
    2.         Open "D:\\test.txt" For Input As #1
    3.             Input #1, okunan
    4.                    If InStr(1, okunan, kategori1, 1) <= 0 Then
    5.                 MsgBox "Böyle bir kayıt yok."
    6.                 Exit Sub
    7.      ElseIf InStr(1, okunan, kategori1, 1) > 0 And Mid(okunan, M - 4, 1) Then
    8.         w = Left(okunan, M - 4)
    9.         w = Trim(w)
    10.         u = Len(w)
    11.    
    12.     ElseIf InStr(1, okunan, kategori1, 1) > 0 And Mid(okunan, M - 5, 1) = "" Then
    13.         w = Left(okunan, M - 5)
    14.         w = Trim(w)
    15.         u = Len(w)
    16.    
    17.     ElseIf InStr(1, okunan, kategori1, 1) > 0 And Mid(okunan, M - 6, 1) = "" Then
    18.         w = Left(okunan, M - 6)
    19.         w = Trim(w)
    20.         u = Len(w)
    21.    
    22.     ElseIf InStr(1, okunan, kategori1, 1) > 0 And Mid(okunan, M - 7, 1) = "" Then
    23.         w = Left(okunan, M - 7)
    24.         w = Trim(w)
    25.         u = Len(w)
    26.    
    27.     ElseIf InStr(1, okunan, kategori1, 1) > 0 And Mid(okunan, M - 8, 1) = "" Then
    28.         w = Left(okunan, M - 8)
    29.         w = Trim(w)
    30.         u = Len(w)
    31.     End If
    32.    
    33.     If Mid(w, u - 1, 1) = "" Then
    34.         c = Mid(w, u, 1)
    35.         c = stok_sayisi + c
    36.     ElseIf Mid(w, u - 2, 1) = "" Then
    37.         c = Mid(w, u - 1, 2)
    38.         c = stok_sayisi + c
    39.     ElseIf Mid(w, u - 3, 1) = "" Then
    40.         c = Mid(w, u - 2, 3)
    41.         c = stok_sayisi + c
    42.     ElseIf Mid(w, u - 4, 1) = "" Then
    43.         c = Mid(w, u - 3, 4)
    44.         c = stok_sayisi + c
    45.     ElseIf Mid(w, u - 5, 1) = "" Then
    46.         c = Mid(w, u - 4, 5)
    47.         c = stok_sayisi + c
    48.     ElseIf Mid(w, u - 6, 1) = "" Then
    49.         c = Mid(w, u - 5, 6)
    50.         c = stok_sayisi + c
    51.     End If
    52.     Text_stok_sayisi.Text = c
    53.    
    54.  
    55. End Sub
    Last edited by _MeRKeZ_; Dec 30th, 2011 at 12:14 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