I want to make a block to call several buttons according to a variable. My idea (which is not correct) would be this:
Private Sub Eliminar()
num = Range("z1").Value
ActiveSheet.Shapes("figura" & num).Select
Selection.Delete
CmdEliminar & 'num'.Enabled = False
CmdGenerar & 'num'.Enabled = True
CmdComparar & 'num'.Enabled = False
CmdComparar & 'num'.Caption = "SEPARAR"
End Sub
Private Sub CmdEliminar4_Click()
Range("z1").Value = 4
Eliminar
End Sub
I know there is some way that is not very different from the one exposed to do it but I do not remember it.