Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

codigo = txt_codigo.

Value

Me.txt_cantidad = Application.WorksheetFunction.VLookup(codigo, Sheets("BD").Range("B:G"), 2,


0)

codigo = LISTA.List(LISTA.ListIndex, 0)

titulo = LISTA.List(LISTA.ListIndex, 1)

autor = LISTA.List(LISTA.ListIndex, 2)

resuemen = LISTA.List(LISTA.ListIndex, 3)

stock = LISTA.List(LISTA.ListIndex, 4)

cantidad = LISTA.List(LISTA.ListIndex, 5)

Me.txt_codigo.Value = codigo

Me.txt_titulo.Value = titulo

Me.txt_autor.Value = autor

Me.txt_resumen.Value = resumen

Me.txt_stock.Value = stock

Me.txt_cantidad.Value = cantidad

, lookat:=xlWhole

antidad.EntireRow.Insert

Dim fila As Object

Dim linea As Integer


valor_buscado = Me.txt_codigo

Set fila = Sheets("BD").Range("B:B").Find(valor_buscado, lookat:=xlWhole)

linea = fila.Row

Range("C" & linea).Value = Me.txt_titulo.Value

Range("D" & linea).Value = Me.txt_autor.Value

Range("E" & linea).Value = Me.txt_resumen.Value

Range("F" & linea).Value = Me.txt_stock.Value

Range("G" & linea).Value = Me.txt_cantidad.Value


Dim codigo As Range

Set codigo = Worksheets("REGISTRO").Range("C4")

codigo.Value = txt_codigo.Text

Dim titulo As Range

Set titulo = Worksheets("REGISTRO").Range("D4")

titulo.Value = txt_titulo.Text

Dim stock As Range

Set stock = Worksheets("REGISTRO").Range("G4")

stock.Value = txt_stock.Text

Dim autor As Range

Set autor = Worksheets("REGISTRO").Range("E4")

autor.Value = txt_autor.Text

Dim resumen As Range

Set resumen = Worksheets("REGISTRO").Range("F4")

resumen.Value = txt_resumen.Text

Dim cantidad As Range

Set cantidad = Worksheets("REGISTRO").Range("H4")

cantidad.Value = txt_cantidad.Text

cantidad.EntireRow.Insert

MsgBox ("SE REGISTRO CORRECTAMENTE")

You might also like