Me copia toda la fila no rango
Estimados buenos días me podrían ayudar, cuando inserto una fila me copia datos en toda la fila del excel .
Dim HojaBD As Worksheet
Set HojaBD = ThisWorkbook.Sheets("BD")
'Creamos la fila
Range("B5").EntireRow.Insert
'Depositamos los datos del formulario en fila excel
HojaBD.Range("B5").Value = Me.Txt_codigo.Value
HojaBD.Range("C5").Value = Me.Txt_DNI.Value
HojaBD.Range("D5").Value = Me.Txt_nombre.Value
HojaBD.Range("E5").Value = Me.Txt_fase_actual.Value
HojaBD.Range("F5").Value = Me.Txt_cargo.Value
HojaBD.Range("G5").Value = Me.Txt_empresa.Value
HojaBD.Range("H5").Value = Me.Txt_ruta.Value
End If
Me.Txt_DNI = Empty
Me.Txt_nombre = Empty
Me.Txt_fase_actual = Empty
Me.Txt_cargo = Empty
Me.Txt_empresa = Empty
Me.Txt_ruta = Empty

1 respuesta
Respuesta de david ..
