Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel tends to freeze up sometimes when I open, close and switch between two
Excel Documents. One is referenced by the other. I think this problem has to do with focus. How can I prevent these freezes? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am not so sure it is a Focus problem. If the workbooks are linked with one
open and the other closed, and you have code in the workbook open that causes a calculation process that relies on the still closed workbook, then it could be causing copiler problems. You might need an If ... Then statement in your workbook open that evaluates whether the other workbook is open and, if not, bypass any code that would cause calculation to occur. Of course, I am only guessing what the problem may be, but if it is what I described, then you could check for the other workbook being open like this, where Workbooks("B.xls") would be your other workbook: Private Sub Workbook_Open() If Workbooks("B.xls") If Nothing Then Exit Sub Else 'Run existing code End If End Sub "JeremyJ" wrote: Excel tends to freeze up sometimes when I open, close and switch between two Excel Documents. One is referenced by the other. I think this problem has to do with focus. How can I prevent these freezes? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the reply. It will freexe when I first run a macro from Workbook
"A" directly after closing Workbook "B" even if the macro from Workbook "A" doesn't have anything to do with Workbook "B". I believe that is what you were talking about. Is it possible that something is still in memory from the closed Workbook (like objects) that could be interferring? Just a guess.... Any ideas??? "JLGWhiz" wrote: I am not so sure it is a Focus problem. If the workbooks are linked with one open and the other closed, and you have code in the workbook open that causes a calculation process that relies on the still closed workbook, then it could be causing copiler problems. You might need an If ... Then statement in your workbook open that evaluates whether the other workbook is open and, if not, bypass any code that would cause calculation to occur. Of course, I am only guessing what the problem may be, but if it is what I described, then you could check for the other workbook being open like this, where Workbooks("B.xls") would be your other workbook: Private Sub Workbook_Open() If Workbooks("B.xls") If Nothing Then Exit Sub Else 'Run existing code End If End Sub "JeremyJ" wrote: Excel tends to freeze up sometimes when I open, close and switch between two Excel Documents. One is referenced by the other. I think this problem has to do with focus. How can I prevent these freezes? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jeremy, it is really difficult to offer meaningful advice because there is no
way to evaluate the symptoms without seeing what is actually in your workbook code modules. It sounds like you might have some event code in the workbook that is the culprit but without being able to see what actually happens and review the different procedures, it is only guessing. It could be anything from corrupted file to perpetual loop that gives the appearance of freezing up. But as I said, it sounds like some event code that is the initiator of the problem. "JeremyJ" wrote: Thanks for the reply. It will freexe when I first run a macro from Workbook "A" directly after closing Workbook "B" even if the macro from Workbook "A" doesn't have anything to do with Workbook "B". I believe that is what you were talking about. Is it possible that something is still in memory from the closed Workbook (like objects) that could be interferring? Just a guess.... Any ideas??? "JLGWhiz" wrote: I am not so sure it is a Focus problem. If the workbooks are linked with one open and the other closed, and you have code in the workbook open that causes a calculation process that relies on the still closed workbook, then it could be causing copiler problems. You might need an If ... Then statement in your workbook open that evaluates whether the other workbook is open and, if not, bypass any code that would cause calculation to occur. Of course, I am only guessing what the problem may be, but if it is what I described, then you could check for the other workbook being open like this, where Workbooks("B.xls") would be your other workbook: Private Sub Workbook_Open() If Workbooks("B.xls") If Nothing Then Exit Sub Else 'Run existing code End If End Sub "JeremyJ" wrote: Excel tends to freeze up sometimes when I open, close and switch between two Excel Documents. One is referenced by the other. I think this problem has to do with focus. How can I prevent these freezes? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I wouldn't know which modules to show. It "freezes" on many of them. Both on
events and other modules that don't trigger events. I hope the file isn't corupted. I don't how to check for that. I think you are correct though that it only gives the appearance of freezing. When I say freeze I mean that the mouse has no affect on the application other than the 3 buttons in the upper right hand corner ("Minimize", Maximize" & "Close"). I am able to run some modules from the VBA Application. While it is "frozen" I can reference a range and show it's value in a msgbox. Does that give any clues? I wish I could explain it better. Thank you for any helps. "JLGWhiz" wrote: Jeremy, it is really difficult to offer meaningful advice because there is no way to evaluate the symptoms without seeing what is actually in your workbook code modules. It sounds like you might have some event code in the workbook that is the culprit but without being able to see what actually happens and review the different procedures, it is only guessing. It could be anything from corrupted file to perpetual loop that gives the appearance of freezing up. But as I said, it sounds like some event code that is the initiator of the problem. "JeremyJ" wrote: Thanks for the reply. It will freexe when I first run a macro from Workbook "A" directly after closing Workbook "B" even if the macro from Workbook "A" doesn't have anything to do with Workbook "B". I believe that is what you were talking about. Is it possible that something is still in memory from the closed Workbook (like objects) that could be interferring? Just a guess.... Any ideas??? "JLGWhiz" wrote: I am not so sure it is a Focus problem. If the workbooks are linked with one open and the other closed, and you have code in the workbook open that causes a calculation process that relies on the still closed workbook, then it could be causing copiler problems. You might need an If ... Then statement in your workbook open that evaluates whether the other workbook is open and, if not, bypass any code that would cause calculation to occur. Of course, I am only guessing what the problem may be, but if it is what I described, then you could check for the other workbook being open like this, where Workbooks("B.xls") would be your other workbook: Private Sub Workbook_Open() If Workbooks("B.xls") If Nothing Then Exit Sub Else 'Run existing code End If End Sub "JeremyJ" wrote: Excel tends to freeze up sometimes when I open, close and switch between two Excel Documents. One is referenced by the other. I think this problem has to do with focus. How can I prevent these freezes? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Focus problem?? | Excel Programming | |||
cmdbarmenu focus problem | Excel Worksheet Functions | |||
Complex focus problem | Excel Programming | |||
Focus problem | Excel Programming | |||
weird focus problem | Excel Programming |