Hi I'm oncro
I would like to modify an item from list1 it does well but not the total sum me text11.text


Code:
Private Type Registrot
codigo As String * 30
producto As String * 25
precio As String * 30
existencias As String * 20
cantidad As String * 10
subtotal As String * 20
End Type
Dim formax As Registrot





Private Type Registro
nombre As String * 30
direccion As String * 25
poblacion As String * 30
telefono As String * 20
nif As String * 20
correo As String * 40
codigo As String * 30
producto As String * 25
precio As String * 30
cantidad As String * 10
existencias As String * 20
subtotal As String * 10
tre As Double
ivax As Double
totalx As Double
End Type
Dim datos As Registro


Dim toot As String
Dim pg As String


If List1.ListIndex < 0 Then
MsgBox "Ningún elemento ha sido seleccionado", vbInformation
Exit Sub
End If


pg = App.Path & "\productos\" & Text7.Text
Open pg For Random As #1 Len = Len(formax)

toot = Val(Text9.Text) - Val(datos.existencias)

If Val(toot) = -1 Then
MsgBox ("No hay  mas material de venta de " & datos.producto & "¡¡¡¡¡¡¡error!!!!!!!!")
Text14.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Combo2.Text = ""
Close #1
Exit Sub
End If
formax.codigo = Text15.Text
formax.producto = Text7.Text
formax.precio = Text8.Text
formax.existencias = Text14.Text
formax.subtotal = Text10.Text
Put #1, , formax
Close #1


Text10.Text = Val(toot) * Text8.Text


Dim gk As String

gk = App.Path & "\facturas" & "\" & Prefix_Facturas & Indices.Codigo_Facturas & ".TXT"

Open gk For Random As #1 Len = Len(datos)
datos.nombre = Trim(Combo1.Text)
datos.poblacion = Text1.Text
datos.direccion = Text2.Text
datos.telefono = Text4.Text
datos.nif = Text5.Text
datos.correo = Text6.Text
datos.producto = Text7.Text
datos.precio = Text8.Text
datos.existencias = Val(toot)
datos.subtotal = Text10.Text
datos.tre = Text11.Text
Text11.Text = Format(Text11.Text, ".00")
datos.ivax = Text12.Text
Text12.Text = Format(Text12.Text, ".00")
datos.totalx = Text13.Text
Text13.Text = Format(Text13.Text, ".00")
Put #1, List1.ListIndex + 1, datos
Close #1

thanks