Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Macro para modificar

publicado

Saludos

Estoy realizado un proyecto excel, con una Base de Datos, quiero modificar(actualizar) la BD, pero al ejecutar el código no hace la actualización y realiza otro registro en la primera fila 

Adjunto al archivo por se me pueden ayudar 

Modificar 2020.xlsm

Featured Replies

publicado

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]
    
    H1.Range("C4,C8,C10,C12").ClearContents

Application.ScreenUpdating = True

Else

    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!

publicado
  • Autor

Excelente Gerson, si funciona muchas gracias

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.