Max Segal
Max Segal

Reputation: 2045

How to avoid grey screen when I close excel?

I use an addin that once opened opens other workbooks ( *.xlsm files) with some macros. These workbooks are hidden and contribute their macros only. When I close excel what I see is that grey screen which indicates there is still a hidden workbook open. How to avoid that and make excel close all hidden workbooks automatically like it happens with PERSONAL.xlsb macrobook?

Thanks.

Upvotes: 0

Views: 2021

Answers (1)

Swapnil Wankhede
Swapnil Wankhede

Reputation: 44

You can write the event in Thisworkbook

Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.Visible = False

End Sub

Upvotes: 1

Related Questions