hello i have this code running at the opening off the excel
When the name of the document is not equal to ''FT Empty.xlsm''. I make sure to delete a button on the Excel sheet (button 24). but when I open the document again and the button is no longer. I get a runtime error. Is there a way to insert a command to delete the section where I look for the file name?
VBA Code:
Private Sub Workbook_Open()
Dim Chemin As String, Name As String
Chemin = ActiveWorkbook.FullName
Name = ActiveWorkbook.Name
If Name = "FT Vide.xlsm" Then
Else
ActiveSheet.Shapes.Range(Array("Button 24")).Select
Selection.Delete
End If
End Sub