Dante urgente en este código que vos me diste para que con un botón para abrir y cerrar excel provoca un error y me queda el archivo cerrado y no puedo habilitar la barra del menu el error se produce acá
ActiveSheet.DrawingObjects("8 Rectángulo redondeado").Select
Por favor me quedo cerrado el acceso a los menúes y me tira un error 1004 en tiempo de ejecución error en el método select del rectangle
Private Sub Workbook_Open()
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
Cerrar
End Sub
Sub Cerrar()
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
End Sub
Sub Abrir()
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",True)"
End Sub
Sub boton(res)
'Por.DAM
activa = ActiveCell.Address
'res = MsgBox("Selecciona", vbYesNo)
If res = "SI" Then
ActiveSheet.DrawingObjects("8 Rectángulo redondeado").Select
If Selection.Text = "ABRIR" Then
Selection.Text = "CERRAR"
Abrir
Else
Selection.Text = "ABRIR"
Cerrar
End If
Range(activa).Select
End If
End Sub
Sub Formulario()
'Por.DAM
activa = ActiveCell.Address
ActiveSheet.DrawingObjects("8 Rectángulo redondeado").Select
If Selection.Text = "ABRIR" Then
UserForm1.Show
Else
UserForm2.Show
End If
Range(activa).Select
End Sub