Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cannot suppress an ErrorMessage
I have 2 separate applications, open at the same time.
When I select any one from "Window" in the Menu Bar I use Private Sub Workbook_WindowActivate(ByVal Wn As Window)and Private Sub Workbook_WindowDeactivate(ByVal Wn As Window),located in "ThisWorkbook" , to set different Custom ToolBars for each application. That's OK. However when I close one of the applications using Workbooks("XXXXXX.xls").Close in a separate module, all is OK except for an Error Message "Application-defined or Object defined Error" The "culprit" seems to be use of the above Activate/DeActivate methods. I have tried to suppress this message using OnError but failed. Any suggestions would be welcome. Don |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cannot suppress an ErrorMessage
I think you have to look at your code and see if you try to do something to
a commandbar or something that has already been deleted. -- Regards, Tom Ogilvy "don bowyer" wrote in message ... I have 2 separate applications, open at the same time. When I select any one from "Window" in the Menu Bar I use Private Sub Workbook_WindowActivate(ByVal Wn As Window)and Private Sub Workbook_WindowDeactivate(ByVal Wn As Window),located in "ThisWorkbook" , to set different Custom ToolBars for each application. That's OK. However when I close one of the applications using Workbooks("XXXXXX.xls").Close in a separate module, all is OK except for an Error Message "Application-defined or Object defined Error" The "culprit" seems to be use of the above Activate/DeActivate methods. I have tried to suppress this message using OnError but failed. Any suggestions would be welcome. Don |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cannot suppress an ErrorMessage
Don, the error message means that you are referring to an object that does
not exist. For example, tying to to close a workbook that is already closed, or getting a value from a sheet that has been deleted. Robert Flanagan Macro Systems Delaware, U.S. 302-234-9857 http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel "don bowyer" wrote in message ... I have 2 separate applications, open at the same time. When I select any one from "Window" in the Menu Bar I use Private Sub Workbook_WindowActivate(ByVal Wn As Window)and Private Sub Workbook_WindowDeactivate(ByVal Wn As Window),located in "ThisWorkbook" , to set different Custom ToolBars for each application. That's OK. However when I close one of the applications using Workbooks("XXXXXX.xls").Close in a separate module, all is OK except for an Error Message "Application-defined or Object defined Error" The "culprit" seems to be use of the above Activate/DeActivate methods. I have tried to suppress this message using OnError but failed. Any suggestions would be welcome. Don |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Suppress @VALUE! on a template. | Excel Discussion (Misc queries) | |||
Suppress a row | Excel Worksheet Functions | |||
suppress warnings | Excel Programming | |||
Errormessage when button is pressed twice or more | Excel Programming | |||
How to suppress Time ? | Excel Programming |