Macro que cambie el color del Botón a la hora de guardar los datos
Para: Dante Amor
Recurriendo nuevamente a tu gran conocimiento en estos temas, tengo varias hojas que son idénticas y algunas no en las cuales las hojas idénticas tienen un botón y me gustaría que al pulsar este cambie el color de rojo a azul según la condiciones que tiene con la macro que me diste.
Sub Guardar() 'Por.Dante Amor 'Guarda los datos de cada hoja en la Hoja "BASE" Application.ScreenUpdating = False Set h = Sheets("Base") Set h1 = ActiveSheet Set b = h.Columns("B").Find(h1.Name, lookat:=xlWhole) If Not b Is Nothing Then res = MsgBox("Estos Datos ya existen, Desea cambiarla?", vbYesNo + vbExclamation, "") If res = vbYes Then h.Cells(b.Row, "C") = h1.[L6] h.Cells(b.Row, "D") = h1.[N7] MsgBox "Fin del proceso", vbInformation, "" End If Else u = h.Range("B" & Rows.Count).End(xlUp).Row + 1 h.Cells(u, "B") = h1.Name h.Cells(u, "C") = h1.[L6] h.Cells(u, "D") = h1.[N7] ' With h.Sort Application.ScreenUpdating = False .SortFields.Clear .SortFields.Add Key:=h.Range("B5:B" & u), _ SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal .SetRange h.Range("B4:AQ" & u) .Header = xlYes .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply Application.ScreenUpdating = True End With ' MsgBox "Se a guardado correctamente", vbInformation End If End Sub
Espero que se entienda mi tema Gracias por la respuesta que me puedas dar.
1 respuesta
Respuesta de Dante Amor
1