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=""
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top