Error Metodo Select de clase Range

Estoy haciendo un programa donde abre un UserForm "ACTUALIZAR"

Estaba funcionando bien y ahorita me marca el error en Método Select de Clase Range aquí el código:

Private Sub btn_actualizar_Click()
Dim codigo As Integer
Dim oficina As Double
Dim valor As Double
Fila = 2
codigo = txt_codigo
Call Visible2

Do Until Sheets("BFDG1").Cells(Fila, 1) = ""
If Sheets("BFDG1").Cells(Fila, 1) = codigo Then
Sheets("BFDG1").Cells(Fila, 1).Select
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = txt_asunto.Text
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = txt_dirigidoa.Text
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = txt_oficina.Text
ActiveCell.Offset(0, 1).Select
ActiveCell.Value = txt_Nombre.Text
ActiveCell.Offset(0, 3).Select
ActiveCell.Value = txt_unitario.Text
Call Invisible2
MsgBox ("Datos Actualizados con Exito!!!")
End If
Fila = Fila + 1
Loop
Call txt_codigo_AfterUpdate
txt_codigo = ""
txt_descripcion = ""
txt_unidad = ""
txt_cantidad = ""
txt_Nombre = ""
txt_unitario = ""
End Sub

Respuesta

¿La hoja activa cuando se intenta seleccionar celdas de BFDG1 es BFDG1? Es lo más obvio que se me ocurre.

Saludos_

1 respuesta más de otro experto

Respuesta

Esta línea esta mal escrita Sheets("BFDG1"). Cells(Fila, 1). Select, lo correcto es

Sheets("BFDG1").Select

cells(Fila, 1).Select

Como la tienes escrita te manda un error 1004 o de clase range y esto es porque Excel no reconoce la instrucción

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas