A
acherony
Hi!
Sub Autoclose()
On Error Resume Next
Application.CommandBars("Menu
Bar").Controls("&Company").Delete
End Sub
I have created menu and I would like to deleted it when document close.
It is working, but if I made changes in doc and then I close doc the
Autoclose will be executed and after that come pop-up window with "Do you
want to save the changes yes/no/cancel) if I press cancel I will go back to
the doc, but my menu is already gone while the Autoclose was executed.
any idea how could I solve this problem.
It is working with close() with Savechanges:=true, but I don´t want to do
that while I could close doc w/out saving.
thanks
Sub Autoclose()
On Error Resume Next
Application.CommandBars("Menu
Bar").Controls("&Company").Delete
End Sub
I have created menu and I would like to deleted it when document close.
It is working, but if I made changes in doc and then I close doc the
Autoclose will be executed and after that come pop-up window with "Do you
want to save the changes yes/no/cancel) if I press cancel I will go back to
the doc, but my menu is already gone while the Autoclose was executed.
any idea how could I solve this problem.
It is working with close() with Savechanges:=true, but I don´t want to do
that while I could close doc w/out saving.
thanks