ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Error while closing Excel (https://www.excelbanter.com/excel-programming/274315-error-while-closing-excel.html)

Daniel Altman

Error while closing Excel
 
Hi all!

I am using Excel 2002 - SP2 in a W2K SP4.
It seems like Excel is trying to compile the code for a worksheet while I am
closing Excel. It is giving me a "Method or data member not found" in the
line

Me.label1.visible = true

This line is called during normal operation and it works fine, it seems like
the problem may be Excel trying to compile the code after destroying the
object label1 while closing.

I avoided it by selecting the "Compile on Demand" option, but I don't like
it (because the user of my program may deselect it again).

Any other ideas?
Any help will be appreciated!

======================================
Daniel Altman
Buenos Aires, Argentina





Bernie Deitrick[_2_]

Error while closing Excel
 
Daniel,

Try getting rid of the Me. and replace it with the name of the actual container:

Userform1.Label1......

HTH,
Bernie
Excel MVP


"Daniel Altman" wrote in message ...
Hi all!

I am using Excel 2002 - SP2 in a W2K SP4.
It seems like Excel is trying to compile the code for a worksheet while I am
closing Excel. It is giving me a "Method or data member not found" in the
line

Me.label1.visible = true

This line is called during normal operation and it works fine, it seems like
the problem may be Excel trying to compile the code after destroying the
object label1 while closing.

I avoided it by selecting the "Compile on Demand" option, but I don't like
it (because the user of my program may deselect it again).

Any other ideas?
Any help will be appreciated!

======================================
Daniel Altman
Buenos Aires, Argentina








All times are GMT +1. The time now is 01:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com