Macro al hacer doble clic en celda

Necesito hacer una macro que al hacer doble clic en una celda, tome la fila para llenar un formulario con la información de dicha fila, si se hacen modificaciones en el formulario estas se guardan en esa fila. De momento trabaja pero al darle guardar se me cierra excel y se pierde todo.

El archivo se encuentra acá

https://www.dropbox.com/s/127eu7bk0f4s0it/Control%20de%20Pedidos.xlsm?dl=0&oref=e 

Respuesta
2

Te regreso el archivo, pasé la macro de guardar, dentro del formulario.

Private Sub CommandButton10_Click()
'Act.Por.Dante Amor
    Set h1 = Sheets("Pedidos")
    Set h2 = Sheets("Parametros")
    '
    'Se define en que fila se va a trabajar
    filt = h2.Cells(1, 6)
    '
    'Se toman los datos de todos los campos
    h1.Cells(filt, h2.Cells(29, 3)) = ComboBox4         'Area
    h1.Cells(filt, h2.Cells(3, 3)) = TextBox11          'Cantidad
    h1.Cells(filt, h2.Cells(2, 3)) = TextBox14          'Cargado a
    h1.Cells(filt, h2.Cells(4, 3)) = TextBox16          'Codigo SAP
    h1.Cells(filt, h2.Cells(14, 3)) = CheckBox15        'Creacion de codigo
    h1.Cells(filt, h2.Cells(5, 3)) = TextBox7           'Descripcion Breve
    h1.Cells(filt, h2.Cells(6, 3)) = TextBox10          'Descripcion Completa
    h1.Cells(filt, h2.Cells(13, 3)) = CheckBox13        'Estado Dormido
    h1.Cells(filt, h2.Cells(21, 3)) = CheckBox1         'Estado Solped
    h1.Cells(filt, h2.Cells(15, 3)) = TextBox17         'Estado Numero Solped
    h1.Cells(filt, h2.Cells(23, 3)) = CheckBox4         'Estado Solped Web
    h1.Cells(filt, h2.Cells(22, 3)) = CheckBox2         'Estado Solped SAP
    h1.Cells(filt, h2.Cells(16, 3)) = TextBox1          'Estado Numero Solped SAP
    h1.Cells(filt, h2.Cells(12, 3)) = CheckBox12        'Estado Cotizacion
    h1.Cells(filt, h2.Cells(9, 3)) = CheckBox9          'Estado Cotizacion 1
    h1.Cells(filt, h2.Cells(10, 3)) = CheckBox10        'Estado Cotizacion 2
    h1.Cells(filt, h2.Cells(11, 3)) = CheckBox11        'Estado Cotizacion 3
    h1.Cells(filt, h2.Cells(7, 3)) = CheckBox3          'Estado Orden de Compra
    h1.Cells(filt, h2.Cells(18, 3)) = TextBox8          'Estado Numero Orden de Compra
    h1.Cells(filt, h2.Cells(20, 3)) = CheckBox5         'Estado Recepcion
    h1.Cells(filt, h2.Cells(19, 3)) = CheckBox8         'Estado Quedan
    h1.Cells(filt, h2.Cells(8, 3)) = CheckBox7          'Estado Cerrado
    h1.Cells(filt, h2.Cells(30, 3)) = ComboBox5         'Equipo
    h1.Cells(filt, h2.Cells(24, 3)) = CDate(TextBox2)   'Fecha de Creacion
    h1.Cells(filt, h2.Cells(25, 3)) = Label19.Caption   'Item
    h1.Cells(filt, h2.Cells(26, 3)) = TextBox15         'Numero de Solicitud
    h1.Cells(filt, h2.Cells(27, 3)) = TextBox13         'Observaciones
    h1.Cells(filt, h2.Cells(28, 3)) = Val(TextBox12)    'Precio
    h1.Cells(filt, h2.Cells(31, 3)) = ComboBox2         'Planta
    h1.Cells(filt, h2.Cells(32, 3)) = ComboBox3         'Sistema
    h1.Cells(filt, h2.Cells(33, 3)) = ComboBox6         'Unidades
End Sub

Te anexo el archivo

https://www.dropbox.com/s/5g68nrzzghjd8bg/Control%20de%20Pedidos%20dam.xlsm?dl=0 


Saludos. Dante Amor

Recuerda valorar la respuesta.

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas