Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Focus problem??

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Focus problem??

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Focus problem??

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Focus problem??

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Focus problem??

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Focus problem?? Jono Excel Programming 3 November 20th 08 01:24 PM
cmdbarmenu focus problem pjbur2005 via OfficeKB.com Excel Worksheet Functions 2 January 28th 07 02:44 AM
Complex focus problem RB Smissaert Excel Programming 7 August 28th 05 02:32 PM
Focus problem Jos Vens Excel Programming 0 May 27th 04 10:29 PM
weird focus problem Ron de Bruin Excel Programming 0 August 8th 03 03:54 PM


All times are GMT +1. The time now is 11:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"