Unable to kill the memory in Excel

T

Taurus

Hello,

I have to hide the status bar when the excel application is completed.
So, I call obj.hide but when I went to print preview, it has an error
and crash the excel application. For some reason, the excel doesn't
work well with call obj.hide. How do I kill the memory and make sure
the print preview will be working?

I could not set obj = nothing yet b'cos I needed obj to do filtering in
the excel.

Public Sub Hide(ByRef obj As Object)
On Error Resume Next

Call obj.Hide
End Sub
Thank you
 
B

Bob Greenblatt

Hello,

I have to hide the status bar when the excel application is completed.
So, I call obj.hide but when I went to print preview, it has an error
and crash the excel application. For some reason, the excel doesn't
work well with call obj.hide. How do I kill the memory and make sure
the print preview will be working?

I could not set obj = nothing yet b'cos I needed obj to do filtering in
the excel.

Public Sub Hide(ByRef obj As Object)
On Error Resume Next

Call obj.Hide
End Sub
Thank you
I think you need to explain more about what you are trying to do. Print
preview should work just fine, Excel does not need to be hidden. Is it just
the status bar you are trying to hide? You can get rid of the "Ready"
message with application.statusbar=""
 
Top