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.

Copiar datos de Excel Acces

publicado

Buenas. Noches

Adjunto.Archivo que estoy intentando copiar datos de Excel a Acces

espero me digan donde estoy cometiendo el error

de antemano muchas gracias

Exportar .zip

Featured Replies

publicado

Compara con tu macro para ver los errores:

Public Cn As Object
Public rs As Object


Sub ExportarAcces()
Dim Cn As Object, rs As Object, n As Long


Sheets("TablaCliente").Activate
If Range("A15") = Empty Then
MsgBox "No Hay Datos para Guardar", vbCritical, "Campos Vacios"
Exit Sub
End If


Set Cn = New ADODB.Connection
Cn.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" _
& ThisWorkbook.Path & "\Cliente.accdb;"
Set rs = New ADODB.Recordset
rs.Open "Tabla_Cliente", Cn, adOpenKeyset, adlockOptimistic, adCmdtable


[COLOR=#008000]'------------------------------------------------[/COLOR]
[COLOR=#008000]'Añade un registro a la base de datos rango B4:B8[/COLOR]
[COLOR=#008000]'------------------------------------------------[/COLOR]
With rs
.AddNew
.Fields("Identificacion") = Range("B4").Value
.Fields("Nombre Apellidos") = Range("B5").Value
.Fields("Ciudad") = Range("B6").Value
.Fields("Direccion") = Range("B7").Value
.Fields("Telefono") = Range("B8").Value
.Update
End With


Set rs = Nothing
Cn.Close
Set Cn = Nothing
MsgBox "Los Datos Fueron Guardados Exitosamente", vbInformation, _
"Cliente Creado Corretamente"
End Sub


[/CODE]

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.