Results 1 to 26 of 26

Thread: Compile errors [resolved]

Threaded View

  1. #1

    Thread Starter
    Banned
    Join Date
    Jul 2007
    Posts
    400

    Resolved Compile errors [resolved]

    Hi guys

    I have a problem with the string, here is the code:


    Code:
    Sub ReadLanguages()
    Dim Language, caption As String
    Language = ReadIniFile(App.Path & "\LNG.ini", "Language", "Language", "")
    Form1.caption = ReadIniFile(App.Path & "\LNG.ini", "Language", "Title", "")
    
    If Language = "English" Then
       Form1.LANG_English.Checked = True
       Form1.LANG_French.Checked = False
    Dim ctl1 As Control
    
    
    If TypeOf ctl1 Is Menu Then _
    ctl1.caption = ReadIniFile(App.Path & "\EN.ini", "ControlsLanguage", ctl1.Name, "")
    
    Next ctl1
    End If
    
    
    If Language = "French" Then
       Form1.LANG_English.Checked = False
       Form1.LANG_French.Checked = True
    
    
    If TypeOf ct2 Is Menu Then _
    ct2.caption = ReadIniFile(App.Path & "\FR.ini", "ControlsLanguage", ct2.Name, "")
    
    Next ctl2
    End If
    
    End Sub


    I have received the error instruction "Compile error: Next without For". The error instruction tells me the problem with the two following codes "Next ctl1" and "Next ctl2". I have tried everything I can do my best but no luck to refix. What can I do in order to refix??



    Thanks,
    Mark
    Last edited by Mark103; Oct 23rd, 2007 at 11:45 AM.

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