J
josnah
I'm trying to delete my custom toolbar using the following:
' Personal.xls, "ThisWokbook"
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("Macros").Visible = False
Application.CommandBars("Macros").Delete
End Sub
However it only works if I close the file manually.
It does not work if I exit MS Excel without closing the file first o
if it is a hidden file.
Is it meant to work only if the file is closed manually? :confused
' Personal.xls, "ThisWokbook"
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("Macros").Visible = False
Application.CommandBars("Macros").Delete
End Sub
However it only works if I close the file manually.
It does not work if I exit MS Excel without closing the file first o
if it is a hidden file.
Is it meant to work only if the file is closed manually? :confused