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.

error 91 variable de objeto o bloque with no establecido

publicado

tengo un problema al momento de querer editar un dato en mi hoja de excel al ejecutar el boton de modificar me manda error 91 variable de objeto o bloque with no establecido  ya le busque y no  le encuentro

adjunto el archivo el problema es el la pestaña AUSENCIAS espero me logren ayudar gracias!!!!

Private Sub BtnEditarAUS_Click()
Dim Rango As Range
Dim NuevaFila As Long
Dim Valor As String ' lo puse como string por que el dato de la columna A es 1-1
Dim mensaje As String

mensaje = MsgBox("ESTAS SEGURO DE EDITAR LOS DATOS", vbQuestion + vbYesNo, "EDITAR DATOS")
   If mensaje = vbYes Then

Set Rango = ThisWorkbook.Sheets("BASE.AUS.").Range("A1").CurrentRegion
Valor = Me.ListView5.SelectedItem

NuevaFila = Rango.Find(what:=Valor, lookat:=xlWhole).Row   ' aqui me manda el error
With Rango

      .Cells(NuevaFila, 1).Value = Me.TextBox85.Value
      .Cells(NuevaFila, 2).Value = Me.TextBox69.Value
      .Cells(NuevaFila, 3).Value = Me.TextBox70.Value
      .Cells(NuevaFila, 4).Value = Me.TextBox71.Value
      .Cells(NuevaFila, 5).Value = Me.TextBox72.Value
      .Cells(NuevaFila, 6).Value = Me.TextBox73.Value
      .Cells(NuevaFila, 8).Value = Me.TextBox74.Value
      .Cells(NuevaFila, 9).Value = Me.TextBox75.Value
      .Cells(NuevaFila, 14).Value = Me.TextBox76.Value
      .Cells(NuevaFila, 15).Value = Me.TextBox77.Value
      .Cells(NuevaFila, 16).Value = Me.TextBox78.Value
      .Cells(NuevaFila, 17).Value = Me.TextBox79.Value
      .Cells(NuevaFila, 18).Value = Me.TextBox80.Value
      .Cells(NuevaFila, 19).Value = Me.TextBox81.Value
      .Cells(NuevaFila, 20).Value = Me.TextBox82.Value
      .Cells(NuevaFila, 21).Value = Me.TextBox83.Value
      .Cells(NuevaFila, 22).Value = Me.TextBox84.Value
      
      


End With
Call cargarhoja5
MultiPage1.Value = 4

MsgBox "DATOS EDITADOS CON EXITO", vbInformation, "EDITAR DATOS"
      Exit Sub
  Else
        MsgBox "CAPTURA CANCELADA", vbExclamation

   End If
End Sub

CONSULTA DE ESCALAFON MANTTO. INSTTOS.xlsm

Featured Replies

publicado

Hola

Para recibir ayuda siempre es bueno enviar los archivos sin protección de las macros. Yo me demoré un par de segundos en desprotegerlas, pero probablemente alguna persona más descargó el archivo o no pudo o le podía tomar más tiempo, lo que se entiende.

Bueno, yendo al dilema, cambia la línea correspondiente por esto y listo:

NuevaFila = Rango.Find(what:=Valor, LookIn:=xlValues, lookat:=xlWhole).Row

Comentas.

publicado
  • Autor

Oohhh cierto olvide ese detalle ahora tengo el detalle de que active un control activex no se como y se me borro el formulario completo ?

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.