Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27329

VS 2008 resolved end of statement not expected error Please help

$
0
0
This is why I hate when another developer sits down and changes your code and generates an error and that now sets you back even in a minor way. Can someone please tell me why this is happening and what change I need to make to get this back to working again ? The end of statement has underlined the Boolean next to handles... Thanks in advance..

Code:

Private Function btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)Handles btnLogin.Click As Boolean

        'assign variables for user name, environment, etc

        Dim LoginApp As Boolean = True
        If Trim$(txtUser.Text) = "" Then  '\\user did not enter a name
            MsgBox("Please enter a user name.", vbCritical, " Error")
            txtUser.Focus()
        Else                                  '\\user did enter a name
            pUserName = txtUser.Text
            pPassword = txtPassword.Text
            pTitle = Cwork.Text
            pEnvmnt = CEnv.Text
            If InStr(pTitle, "Amisys Only") Then pTitle = "None"
            'loginSuccess = LoginApp(msUserName, msPassword, msTitle, msEnvmnt)
            'If loginSuccess Then
            '    Me.Close()
            'Else
            '    Me.Show()
            'End If

        End If

        LoginApp = False
        'Dim bValue As Boolean
        aa_vb_interface = New AA_Library_Class
        aa_vb_interface.CloseBrowserAlerts()

        If pEnvmnt = "Prod" Then


        End If

        If pEnvmnt = "Test" Then


        End If

        If pEnvmnt = "rel6" Then
            aa_vb_interface.OpenWindow("http://BLAH1/Controller?view=jsp/Pportal.jsp", pTitle, pUserName, pPassword, True)
        End If


        If pEnvmnt = "Uat1" Then

            aa_vb_interface.OpenWindow("http://BLAH2/Controller?view=jsp/Pportal.jsp", pTitle, pUserName, pPassword, True)

        End If

        If pEnvmnt = "r6config" Then
            aa_vb_interface.OpenWindow("http://BLAH3/Controller?view=jsp/Pportal.jsp", pTitle, pUserName, pPassword, True)

        End If

        If pEnvmnt = "Uat5" Then
            aa_vb_interface.OpenWindow("http://BLAH4/Controller?view=jsp/Pportal.jsp", pTitle, pUserName, pPassword, True)

        End If

        If pEnvmnt = "r6icg" Then

            aa_vb_interface.OpenWindow("http://BLAH5/Controller?view=jsp/Pportal.jsp", pTitle, pUserName, pPassword, True)

        End If

        If pEnvmnt = "r6bss" Then

            aa_vb_interface.OpenWindow("http://BLAH6/Controller?view=jsp/Pportal.jsp", pTitle, pUserName, pPassword, True)

        End If

        Try
            aa_vb_interface.WaitForHostTrigger()
            aa_vb_interface.LoginApp()


            Do While Not aa_vb_interface.IsAALoadComplete()
                aa_vb_interface.WaitForHostTrigger()
            Loop
            aa_vb_interface.WaitForHostTrigger()
            aa_vb_interface.WaitForHostTrigger()
            aa_vb_interface.CloseBrowserAlerts()
            LoginApp = True
        Catch ex As Exception
            LoginApp = False
        End Try
        Return False
    End Function


Viewing all articles
Browse latest Browse all 27329

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>