Jump to content

Macro para modificar

Go to solution Solved by Gerson Pineda,

Recommended Posts

  • Solution

Hola @Dani2020 

Lo que pasa que estas confundiendo las variables, y eso hace que falle

Prueba esto, a ver como te va

Sub Modificar()

Set H1 = Sheets("CERTIFICACION")
Set H2 = Sheets("BD")

Set BD = H2.Columns("A").Find(H1.[C4], lookat:=xlWhole)

If H1.[C4] <> "" Then

If Not BD Is Nothing Then

Application.ScreenUpdating = False

    fi = BD.Row
    H2.Cells(fi, "B") = H1.[C6]
    H2.Cells(fi, "C") = H1.[C8]
    H2.Cells(fi, "D") = H1.[C10]
    H2.Cells(fi, "E") = H1.[C12]

Application.ScreenUpdating = True


    VBA.MsgBox "Nombre no encontrado", vbCritical, "AyudaExcel"

End If

End If

Set H1 = Nothing
Set H2 = Nothing
Set BD = Nothing

End Sub

Supongo que mi código es similar al @tierra_pampa


Saludos a ambos!

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Posts

  • Recently Browsing

    No registered users viewing this page.

  • Create New...

Important Information

Privacy Policy