Greetings! The operating system on my computer is Windows Vista, and I am using Macro Scheduler Version 11. Under certain circumstances, a macro which uses the following code to change focus from one Excel 2007 workbook to another leaves the 2nd workbook in a somewhat unstable (or confused) state:
Code: Select all
SetFocus>BookDates.xlsm
waitready>0
Wait>0.3
Code: Select all
Let>Tbl300End=IssuerListNDX+10
// IssuerListNDX points to the last cell of Table 300. The last 10 cells of
// the range are blank.
// Select C300:C%Tbl300End%
Press F5
Wait>0.3
WaitWindowOpen>Go To
Wait>0.3
Let>Param300={"c300"+":c%Tbl300End%"}
Send>%Param300%%CR%
Code: Select all
// Try CTL-F6 to switch to next workbook; Set Focus>BookDates.xlsm seems not to be working 100%.
Press CTRL
Wait>0.2
Press F6
WaitReady>0
Wait>0.2
Release CTRL
Wait>3
PS: It seems as if the worksheet has the focus for some operations but not for others after the macro performs the SetFocus operation.
PPS: Even after replacing the SetFocus with a CTL-F6, this workbook "Freeze" problem still occurs occasionally. It is now an intermittent problem and occurred this morning. Since no one on this forum seems to know how to approach this problem, I called Microsoft Tech Support (for which there would be a $49 charge when they resolve this problem.) I was routed to Gaurav Kumar, a Microsoft Tech Support Officer-Consumer Support for Excel 2007. I gave Gaurav permission to remotely access my Desktop. He was unable to select any cells on the worksheet of the frozen workbook. He noted that Ctrl-Home put A1 in the Address box, but the screen remained frozen. Likewise with Ctrl-End to go to the last data cell. With the frozen worksheet still open and having the focus, he suggested opening and closing a new blank workbook. This unfroze the screen of the "frozen" worksheet. He does not think that the problem is in his area of expertise. I should also add that yesterday, an expert in Excel and Excel VBA stopped over to my house and read the above description of this problem in this forum. He was shocked that no one on this forum had any comments or suggestions regarding this problem.