Ocultar/Mostrar check box en hoja de cálculo
Estimad@s
Tengo una hoja que está protegida que tiene un check box, la idea es que al aplicar unas macro el check box aparezca o se oculte. Ahora el ocultarlo funciona perfecto, pero al aplicar la macro para hacerlo visible me aparece un error:
"se ha producido el error -2147024809 (80070057)' en tiempo de ejecución: La selección de las formas solicitada está bloqueada."
El código que ocupo es:
Sub ocultar_chkbox ()
Sheets("CP").Select
ActiveSheet.Unprotect "xxx"
Sheets("CP").Shapes("Check Box 4").Select
With Selection
.Value = xlOff
.Visible = False
End With
ActiveSheet.Protect "xxx"
End Sub
Sub mostrar_chkbox ()
Sheets("CP").Select
ActiveSheet.Unprotect "xxx"
Sheets("CP").Shapes("Check Box 4").Select
With Selection
.Value = xlOff
.Visible = True
End With
ActiveSheet.Protect "xxx"
end subAlguna Idea?
1 respuesta
Respuesta de Abraham Valencia
1
