Private Sub SCGrid1_TextChange(ByVal Row As Integer, ByVal Col As Integer)
Dim Tarifa As Single
Dim TipoCambio As Single
Dim PorcentajeComision As Single
Dim FechaHoy As Date
Dim Canal As String
Dim Agencia As String
Dim ConceptoPago As String
Dim Formapago As String
Dim Adultos As Single
Dim Menores As Single
Dim Importe As Single
Dim TarifaBase As Single
Dim TarifaBasePesos As Single
Dim PorcentajeComisionBase As Single
Dim Neto As Single
Dim NetoPesos As Single
Dim Comision As Single
Dim ComisionBase As Single
Dim ComisionPesos As Single

Canal = frmPagoTour.ComboCanal
Agencia = frmPagoTour.ComboSubCanal
TarifaBase = frmPagoTour.txtTarifa
TipoCambio = frmPagoTour.txtTipoCambio
PorcentajeComisionBase = frmPagoTour.txtPorcentajeComision
ComisionBase = (TarifaBase) * ((PorcentajeComisionBase) / (100))
Neto = TarifaBase - ComisionBase
TarifaBasePesos = TarifaBase * TipoCambio
ComisionPesos = Comision * TipoCambio
NetoPesos = Neto * TipoCambio
FechaHoy = Format(Now(), "dd/MM/yy")
    If CasillaBusqueda = 1 Then
        Selecciona la columna que cambio y calcula el cambio para las dems
    If Col = 1 Then
            ConceptoPago = SCGrid1.Text(Row, 1)
            If SCGrid1.Text(Row, 1) = "Brazalete Angel" Then
                SCGrid1.Text(Row, 2) = "Dolares USA"
                Tarifa = DLookup("CPagoimporte", "CPagos", "CPago = 'Brazalete Angel'")
                TipoCambio = DLookup("Ftc", "FPagos", "FIdent='Dolares USA'")
                PorcentajeComision = 0
                SCGrid1.Text(Row, 4) = Tarifa
                SCGrid1.Text(Row, 8) = TipoCambio
                SCGrid1.Text(Row, 9) = PorcentajeComision
                If IsNumeric(SCGrid1.Text(Row, 5)) And IsNumeric(SCGrid1.Text(Row, 6)) Then
                    Adultos = SCGrid1.Text(Row, 5)
                    Menores = SCGrid1.Text(Row, 6)
                    SCGrid1.Text(Row, 7) = (Adultos + Menores) * Tarifa
                End If
            End If
            
            If SCGrid1.Text(Row, 1) = "Comisiones Tarjeta Credito" Then
                Formapago = "Tarjeta de credito"
                Tarifa = 0
                TipoCambio = 1
                PorcentajeComision = 0
                Adultos = 0
                Menores = 0
                Importe = 0
                SCGrid1.Text(Row, 2) = Formapago
                SCGrid1.Text(Row, 4) = Tarifa
                SCGrid1.Text(Row, 5) = Adultos
                SCGrid1.Text(Row, 6) = Menores
                SCGrid1.Text(Row, 7) = Importe
                SCGrid1.Text(Row, 8) = TipoCambio
                SCGrid1.Text(Row, 9) = PorcentajeComision
            End If
            
            If SCGrid1.Text(Row, 1) = "Comisiones Tarjeta Credito Dolares" Then
                Formapago = "Tarjeta de credito dolares"
                Tarifa = 0
                TipoCambio = DLookup("Ftc", "FPagos", "FIdent='Tarjeta de credito dolares'")
                PorcentajeComision = 0
                Adultos = 0
                Menores = 0
                Importe = 0
                SCGrid1.Text(Row, 2) = Formapago
                SCGrid1.Text(Row, 4) = Tarifa
                SCGrid1.Text(Row, 5) = Adultos
                SCGrid1.Text(Row, 6) = Menores
                SCGrid1.Text(Row, 7) = Importe
                SCGrid1.Text(Row, 8) = TipoCambio
                SCGrid1.Text(Row, 9) = PorcentajeComision
            End If
            
            If SCGrid1.Text(Row, 1) = "Dao Embarcacion" Then
                Formapago = "Dolares USA"
                Tarifa = 0
                TipoCambio = DLookup("AgenciaTipocambio", "TCambio", "Agenciaidtc = 'Sunrise' And AgenciaFecha <= #" & FechaHoy & "#")
                PorcentajeComision = 0
                Adultos = 0
                Menores = 0
                Importe = 0
                SCGrid1.Text(Row, 2) = Formapago
                SCGrid1.Text(Row, 4) = Tarifa
                SCGrid1.Text(Row, 5) = Adultos
                SCGrid1.Text(Row, 6) = Menores
                SCGrid1.Text(Row, 7) = Menores
                SCGrid1.Text(Row, 8) = TipoCambio
                SCGrid1.Text(Row, 9) = PorcentajeComision
            End If
            If DLookup("IIdent", "Servicios", "IIdent='" & ConceptoPago & "'") <> "No Encontrado" Then
                    Tarifa = frmPagoTour.txtTarifa
                    TipoCambio = frmPagoTour.txtTipoCambio
                    PorcentajeComision = frmPagoTour.txtPorcentajeComision
                    SCGrid1.Text(Row, 4) = Tarifa
                    SCGrid1.Text(Row, 8) = TipoCambio
                    SCGrid1.Text(Row, 9) = PorcentajeComision
                    If Canal = "Agencia" Then
                        SCGrid1.Text(Row, 2) = "Cupon Agencia"
                    Else
                        SCGrid1.Text(Row, 2) = "Dolares USA"
                    End If
                    If IsNumeric(SCGrid1.Text(Row, 5)) And IsNumeric(SCGrid1.Text(Row, 6)) Then
                        Tarifa = SCGrid1.Text(Row, 4)
                        Adultos = SCGrid1.Text(Row, 5)
                        Menores = SCGrid1.Text(Row, 6)
                        SCGrid1.Text(Row, 7) = (Adultos + (Menores / 2)) * (Tarifa)
                    End If
            End If
        End If

    If Col = 2 Then
        If SCGrid1.Text(Row, 1) <> "" Then
        ConceptoPago = SCGrid1.Text(Row, 1)
        Formapago = SCGrid1.Text(Row, 2)
        
        If ConceptoPago = "Brazalete Angel" Then
            If Formapago = "Dolares USA" Then
                Tarifa = DLookup("CPagoimporte", "CPagos", "CPago = 'Brazalete Angel'")
                TipoCambio = DLookup("Ftc", "FPagos", "FIdent='Dolares USA'")
                PorcentajeComision = 0
                SCGrid1.Text(Row, 4) = Tarifa
                SCGrid1.Text(Row, 8) = TipoCambio
                SCGrid1.Text(Row, 9) = PorcentajeComision
                
                If IsNumeric(SCGrid1.Text(Row, 5)) And IsNumeric(SCGrid1.Text(Row, 6)) Then
                    Adultos = SCGrid1.Text(Row, 5)
                    Menores = SCGrid1.Text(Row, 6)
                    SCGrid1.Text(Row, 7) = (Adultos + Menores) * Tarifa
                End If
            End If
            If Formapago = "Moneda Nacional" Or Formapago = "Tarjeta de credito" Then
                Tarifa = DLookup("CPagoimporte", "CPagos", "CPago = 'Brazalete Angel'")
                TipoCambio = DLookup("Ftc", "FPagos", "FIdent='Dolares USA'")
                PorcentajeComision = 0
                SCGrid1.Text(Row, 4) = Tarifa * TipoCambio
                SCGrid1.Text(Row, 8) = 1
                SCGrid1.Text(Row, 9) = PorcentajeComision
                
                If IsNumeric(SCGrid1.Text(Row, 5)) And IsNumeric(SCGrid1.Text(Row, 6)) Then
                    Adultos = SCGrid1.Text(Row, 5)
                    Menores = SCGrid1.Text(Row, 6)
                    SCGrid1.Text(Row, 7) = (Adultos + Menores) * (SCGrid1.Text(Row, 4))
                End If
            End If
            If Formapago = "Tarjeta de credito dolares" Then
                Tarifa = DLookup("CPagoimporte", "CPagos", "CPago = 'Brazalete Angel'")
                TipoCambio = DLookup("Ftc", "FPagos", "FIdent='Dolares USA'")
                PorcentajeComision = 0
                SCGrid1.Text(Row, 4) = Tarifa
                SCGrid1.Text(Row, 8) = TipoCambio
                SCGrid1.Text(Row, 9) = PorcentajeComision
                
                If IsNumeric(SCGrid1.Text(Row, 5)) And IsNumeric(SCGrid1.Text(Row, 6)) Then
                    Adultos = SCGrid1.Text(Row, 5)
                    Menores = SCGrid1.Text(Row, 6)
                    SCGrid1.Text(Row, 7) = (Adultos + Menores) * Tarifa
                End If
            End If
        End If
        
        If ConceptoPago = "Dao Embarcacion" Then
            If Formapago = "Dolares USA" Then
                Tarifa = 0
                Adultos = 0
                Menores = 0
                TipoCambio = DLookup("AgenciaTipocambio", "TCambio", "Agenciaidtc = 'Sunrise' And AgenciaFecha <= #" & FechaHoy & "#")
                PorcentajeComision = 0
                SCGrid1.Text(Row, 4) = Tarifa
                SCGrid1.Text(Row, 5) = Adultos
                SCGrid1.Text(Row, 6) = Menores
                SCGrid1.Text(Row, 8) = TipoCambio
                SCGrid1.Text(Row, 9) = PorcentajeComision
            End If

            If Formapago = "Moneda Nacional" Or Formapago = "Tarjeta de credito" Then
                Tarifa = 0
                Adultos = 0
                Menores = 0
                TipoCambio = 1
                PorcentajeComision = 0
                SCGrid1.Text(Row, 4) = Tarifa
                SCGrid1.Text(Row, 5) = Adultos
                SCGrid1.Text(Row, 6) = Menores
                SCGrid1.Text(Row, 8) = TipoCambio
                SCGrid1.Text(Row, 9) = PorcentajeComision
            End If

            If Formapago = "Tarjeta de credito dolares" Then
                Tarifa = 0
                Adultos = 0
                Menores = 0
                TipoCambio = DLookup("Ftc", "FPagos", "FIdent='Dolares USA'")
                PorcentajeComision = 0
                SCGrid1.Text(Row, 4) = Tarifa
                SCGrid1.Text(Row, 5) = Adultos
                SCGrid1.Text(Row, 6) = Menores
                SCGrid1.Text(Row, 8) = TipoCambio
                SCGrid1.Text(Row, 9) = PorcentajeComision
            End If
        End If
        
        If DLookup("IIdent", "Servicios", "IIdent='" & ConceptoPago & "'") <> "No Encontrado" Then
                If Formapago = "Cortesia" Or Formapago = "Incentivo" Then
                    Tarifa = 0
                    TipoCambio = frmPagoTour.txtTipoCambio
                    PorcentajeComision = frmPagoTour.txtPorcentajeComision
                    SCGrid1.Text(Row, 4) = Tarifa
                    SCGrid1.Text(Row, 8) = TipoCambio
                    SCGrid1.Text(Row, 9) = PorcentajeComision
                    If IsNumeric(SCGrid1.Text(Row, 5)) And IsNumeric(SCGrid1.Text(Row, 6)) Then
                        Tarifa = SCGrid1.Text(Row, 4)
                        Adultos = SCGrid1.Text(Row, 5)
                        Menores = SCGrid1.Text(Row, 6)
                        SCGrid1.Text(Row, 7) = (Adultos + (Menores / 2)) * (Tarifa)
                    End If
                End If
                If Formapago = "Cupon agencia" Then
                    Tarifa = frmPagoTour.txtTarifa
                    TipoCambio = frmPagoTour.txtTipoCambio
                    PorcentajeComision = frmPagoTour.txtPorcentajeComision
                    SCGrid1.Text(Row, 4) = Tarifa
                    SCGrid1.Text(Row, 8) = TipoCambio
                    SCGrid1.Text(Row, 9) = PorcentajeComision
                    If IsNumeric(SCGrid1.Text(Row, 5)) And IsNumeric(SCGrid1.Text(Row, 6)) Then
                        Tarifa = SCGrid1.Text(Row, 4)
                        Adultos = SCGrid1.Text(Row, 5)
                        Menores = SCGrid1.Text(Row, 6)
                        SCGrid1.Text(Row, 7) = (Adultos + (Menores / 2)) * (Tarifa)
                    End If
                End If
                If Formapago = "Dolares USA" Then
                    Tarifa = frmPagoTour.txtTarifa
                    TipoCambio = frmPagoTour.txtTipoCambio
                    If Canal = "Agencia" Then
                        PorcentajeComision = 0
                        Else
                        PorcentajeComision = frmPagoTour.txtPorcentajeComision
                    End If
                    SCGrid1.Text(Row, 4) = Tarifa
                    SCGrid1.Text(Row, 8) = TipoCambio
                    SCGrid1.Text(Row, 9) = PorcentajeComision
                    If IsNumeric(SCGrid1.Text(Row, 5)) And IsNumeric(SCGrid1.Text(Row, 6)) Then
                        Tarifa = SCGrid1.Text(Row, 4)
                        Adultos = SCGrid1.Text(Row, 5)
                        Menores = SCGrid1.Text(Row, 6)
                        SCGrid1.Text(Row, 7) = (Adultos + (Menores / 2)) * (Tarifa)
                    End If
                End If
                If Formapago = "Moneda Nacional" Or Formapago = "Tarjeta de credito" Then
                    Tarifa = frmPagoTour.txtTarifa
                    TipoCambio = frmPagoTour.txtTipoCambio
                    If Canal = "Agencia" Then
                        PorcentajeComision = 0
                        Else
                        PorcentajeComision = frmPagoTour.txtPorcentajeComision
                    End If
                    SCGrid1.Text(Row, 4) = Tarifa * TipoCambio
                    SCGrid1.Text(Row, 8) = 1
                    SCGrid1.Text(Row, 9) = PorcentajeComision
                    If IsNumeric(SCGrid1.Text(Row, 5)) And IsNumeric(SCGrid1.Text(Row, 6)) Then
                        Tarifa = SCGrid1.Text(Row, 4)
                        Adultos = SCGrid1.Text(Row, 5)
                        Menores = SCGrid1.Text(Row, 6)
                        SCGrid1.Text(Row, 7) = (Adultos + (Menores / 2)) * (SCGrid1.Text(Row, 4))
                    End If
                End If
                If Formapago = "Tarjeta de credito dolares" Then
                    Tarifa = frmPagoTour.txtTarifa
                    TipoCambio = frmPagoTour.txtTipoCambio
                    If Canal = "Agencia" Then
                        PorcentajeComision = 0
                        Else
                        PorcentajeComision = frmPagoTour.txtPorcentajeComision
                    End If
                    SCGrid1.Text(Row, 4) = Tarifa
                    SCGrid1.Text(Row, 8) = TipoCambio
                    SCGrid1.Text(Row, 9) = PorcentajeComision
                    If IsNumeric(SCGrid1.Text(Row, 5)) And IsNumeric(SCGrid1.Text(Row, 6)) Then
                        Tarifa = SCGrid1.Text(Row, 4)
                        Adultos = SCGrid1.Text(Row, 5)
                        Menores = SCGrid1.Text(Row, 6)
                        SCGrid1.Text(Row, 7) = (Adultos + (Menores / 2)) * (Tarifa)
                    End If
                End If
                If Formapago = "Traveler Cheqs" Then
                    Tarifa = frmPagoTour.txtTarifa
                    TipoCambio = frmPagoTour.txtTipoCambio
                    If Canal = "Agencia" Then
                        PorcentajeComision = 0
                        Else
                        PorcentajeComision = frmPagoTour.txtPorcentajeComision
                    End If
                    SCGrid1.Text(Row, 4) = Tarifa
                    SCGrid1.Text(Row, 8) = TipoCambio
                    SCGrid1.Text(Row, 9) = PorcentajeComision
                    If IsNumeric(SCGrid1.Text(Row, 5)) And IsNumeric(SCGrid1.Text(Row, 6)) Then
                        Tarifa = SCGrid1.Text(Row, 4)
                        Adultos = SCGrid1.Text(Row, 5)
                        Menores = SCGrid1.Text(Row, 6)
                        SCGrid1.Text(Row, 7) = (Adultos + (Menores / 2)) * (Tarifa)
                    End If
                End If
        End If
        End If
    End If
    If Col = 4 Then
        Formapago = SCGrid1.Text(Row, 2)
        If Not IsNumeric(SCGrid1.Text(Row, 4)) Then
            SCGrid1.Text(Row, 7) = ""
            If Canal = "Directas" Then
            SCGrid1.Text(Row, 9) = ""
            End If
        Else
            If IsNumeric(SCGrid1.Text(Row, 5)) And IsNumeric(SCGrid1.Text(Row, 6)) Then
                If SCGrid1.Text(Row, 1) = "Brazalete Angel" Then
                    Tarifa = SCGrid1.Text(Row, 4)
                    Adultos = SCGrid1.Text(Row, 5)
                    Menores = SCGrid1.Text(Row, 6)
                    SCGrid1.Text(Row, 7) = (Adultos + Menores) * Tarifa
                Else
                    If Canal = "Directas" Then
                        Tarifa = SCGrid1.Text(Row, 4)
                        Adultos = SCGrid1.Text(Row, 5)
                        Menores = SCGrid1.Text(Row, 6)
                        SCGrid1.Text(Row, 7) = (Adultos + (Menores / 2)) * (Tarifa)
                        If Formapago = "Dolares USA" Or Formapago = "Cupon agencia" Or Formapago = "Tarjeta de credito dolares" Or Formapago = "Traveler Cheques" Then
                        Comision = Tarifa - Neto
                            If Comision > 0 Then
                            PorcentajeComision = Round(((Tarifa - Neto) / (Tarifa)) * (100), 2)
                            SCGrid1.Text(Row, 9) = PorcentajeComision
                            Else
                            SCGrid1.Text(Row, 9) = 0
                            End If
                        End If
                        If Formapago = "Moneda Nacional" Or Formapago = "Tarjeta de credito" Then
                        Comision = Tarifa - NetoPesos
                            If Comision > 0 Then
                            PorcentajeComision = Round(((Tarifa - NetoPesos) / (Tarifa)) * (100), 2)
                            SCGrid1.Text(Row, 9) = PorcentajeComision
                            Else
                            SCGrid1.Text(Row, 9) = 0
                            End If
                        End If
                        Else
                        Tarifa = SCGrid1.Text(Row, 4)
                        Adultos = SCGrid1.Text(Row, 5)
                        Menores = SCGrid1.Text(Row, 6)
                        SCGrid1.Text(Row, 7) = (Adultos + (Menores / 2)) * (Tarifa)
                    End If
                End If
            End If
        End If
    End If
        
    If Col = 5 Then
        If Not IsNumeric(SCGrid1.Text(Row, 5)) Then
            SCGrid1.Text(Row, 7) = ""
        Else
            If IsNumeric(SCGrid1.Text(Row, 5)) And IsNumeric(SCGrid1.Text(Row, 6)) Then
                If SCGrid1.Text(Row, 1) = "Brazalete Angel" Then
                    Tarifa = SCGrid1.Text(Row, 4)
                    Adultos = SCGrid1.Text(Row, 5)
                    Menores = SCGrid1.Text(Row, 6)
                    SCGrid1.Text(Row, 7) = (Adultos + Menores) * Tarifa
                Else
                    Tarifa = SCGrid1.Text(Row, 4)
                    Adultos = SCGrid1.Text(Row, 5)
                    Menores = SCGrid1.Text(Row, 6)
                    SCGrid1.Text(Row, 7) = (Adultos + (Menores / 2)) * (Tarifa)
                End If
            End If
        End If
    End If
        
    If Col = 6 Then
        If Not IsNumeric(SCGrid1.Text(Row, 6)) Then
            SCGrid1.Text(Row, 7) = ""
        Else
            If IsNumeric(SCGrid1.Text(Row, 5)) And IsNumeric(SCGrid1.Text(Row, 6)) Then
                If SCGrid1.Text(Row, 1) = "Brazalete Angel" Then
                    Tarifa = SCGrid1.Text(Row, 4)
                    Adultos = SCGrid1.Text(Row, 5)
                    Menores = SCGrid1.Text(Row, 6)
                    SCGrid1.Text(Row, 7) = (Adultos + Menores) * Tarifa
                Else
                    Tarifa = SCGrid1.Text(Row, 4)
                    Adultos = SCGrid1.Text(Row, 5)
                    Menores = SCGrid1.Text(Row, 6)
                    SCGrid1.Text(Row, 7) = (Adultos + (Menores / 2)) * (Tarifa)
                End If
            End If
        End If
    End If
        
    If Col = 7 Then
        ConceptoPago = SCGrid1.Text(Row, 1)
        Formapago = SCGrid1.Text(Row, 2)
        If Not IsNumeric(SCGrid1.Text(Row, 7)) Then
            If DLookup("IIdent", "Servicios", "IIdent='" & ConceptoPago & "'") <> "No Encontrado" Or SCGrid1.Text(Row, 2) <> "Brazalete Angel" Then
            SCGrid1.Text(Row, 4) = 0
            Else
            SCGrid1.Text(Row, 4) = ""
            End If
        Else
            If IsNumeric(SCGrid1.Text(Row, 5)) And IsNumeric(SCGrid1.Text(Row, 6)) Then
                If SCGrid1.Text(Row, 1) = "Brazalete Angel" Then
                    Importe = SCGrid1.Text(Row, 7)
                    Adultos = SCGrid1.Text(Row, 5)
                    Menores = SCGrid1.Text(Row, 6)
                    SCGrid1.Text(Row, 4) = (Importe) / (Adultos + Menores)
                End If
                If DLookup("IIdent", "Servicios", "IIdent='" & ConceptoPago & "'") <> "No Encontrado" Then
                    If Canal = "Directas" Then
                    Importe = SCGrid1.Text(Row, 7)
                    Adultos = SCGrid1.Text(Row, 5)
                    Menores = SCGrid1.Text(Row, 6)
                    SCGrid1.Text(Row, 4) = (2 * Importe) / ((2 * Adultos) + Menores)
                    Tarifa = SCGrid1.Text(Row, 4)
                    If Formapago = "Dolares USA" Or Formapago = "Cupon agencia" Or Formapago = "Tarjeta de credito dolares" Or Formapago = "Traveler Cheques" Then
                    Comision = Tarifa - Neto
                        If Comision > 0 Then
                        PorcentajeComision = Round(((Tarifa - Neto) / (Tarifa)) * (100), 2)
                        SCGrid1.Text(Row, 9) = PorcentajeComision
                        Else
                        SCGrid1.Text(Row, 9) = 0
                        End If
                    End If
                    If Formapago = "Moneda Nacional" Or Formapago = "Tarjeta de credito" Then
                    Comision = Tarifa - NetoPesos
                        If Comision > 0 Then
                        PorcentajeComision = Round(((Tarifa - NetoPesos) / (Tarifa)) * (100), 2)
                        SCGrid1.Text(Row, 9) = PorcentajeComision
                        Else
                        SCGrid1.Text(Row, 9) = 0
                        End If
                    End If
                    Else
                    Importe = SCGrid1.Text(Row, 7)
                    Adultos = SCGrid1.Text(Row, 5)
                    Menores = SCGrid1.Text(Row, 6)
                    SCGrid1.Text(Row, 4) = (2 * Importe) / ((2 * Adultos) + Menores)
                    End If
                End If
            End If
        End If
    End If
    
    If Col = 9 Then
    ConceptoPago = SCGrid1.Text(Row, 1)
    Formapago = SCGrid1.Text(Row, 2)
        If Not IsNumeric(SCGrid1.Text(Row, 9)) Then
            If DLookup("IIdent", "Servicios", "IIdent='" & ConceptoPago & "'") <> "No Encontrado" Or SCGrid1.Text(Row, 2) <> "Brazalete Angel" Then
            SCGrid1.Text(Row, 4) = 0
            Else
            SCGrid1.Text(Row, 4) = ""
            End If
        Else
            If IsNumeric(SCGrid1.Text(Row, 5)) And IsNumeric(SCGrid1.Text(Row, 6)) Then
                If DLookup("IIdent", "Servicios", "IIdent='" & ConceptoPago & "'") <> "No Encontrado" Then
                    If Canal = "Directas" Then
                        PorcentajeComision = SCGrid1.Text(Row, 9)
                        If PorcentajeComision >= 100 Then
                        MsgBox "No se debe dar comisiones mayores al 100%"
                        Tarifa = TarifaBase
                        Adultos = SCGrid1.Text(Row, 5)
                        Menores = SCGrid1.Text(Row, 6)
                        Importe = (Tarifa) * (Adultos + (Menores) / (2))
                        SCGrid1.Text(Row, 4) = Tarifa
                        SCGrid1.Text(Row, 7) = Importe
                        Else
                        If Formapago = "Dolares USA" Or Formapago = "Cupon agencia" Or Formapago = "Tarjeta de credito dolares" Or Formapago = "Traveler Cheques" Then
                        Tarifa = (Neto) / (1 - (PorcentajeComision) / (100))
                        End If
                        If Formapago = "Moneda Nacional" Or Formapago = "Tarjeta de credito" Then
                        Tarifa = (NetoPesos) / (1 - (PorcentajeComision) / (100))
                        End If
                        Adultos = SCGrid1.Text(Row, 5)
                        Menores = SCGrid1.Text(Row, 6)
                        Importe = (Tarifa) * (Adultos + (Menores) / (2))
                        SCGrid1.Text(Row, 4) = Tarifa
                        SCGrid1.Text(Row, 7) = Importe
                        End If
                    End If
                End If
            End If
        End If
    End If
 End If
    blnFieldChanged = True
    cmdQuit.Enabled = False
End Sub
