Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Task Bar & Windows Title changes
Excel 2002, WinXP
I have some code that opens another file, checks it for various criteria, and closes that file. I have that code bracketed with the ScreenUpdating False/True statements. All this works just fine, except that the task bar at the bottom of the screen jumps during this process of opening/closing of this other file. Is there a way to "freeze" or otherwise prevent the task bar from jumping during this section of my code? My user says that the title bar at the top of the Excel window also jumps, so the same question applies to that. Thanks for your help. Otto |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Task Bar & Windows Title changes
Hi Otto:
Try this at your own risk: Private Declare Function LockWindowUpdate Lib "USER32" _ (ByVal hwndLock As Long) As Long Private Declare Function GetDesktopWindow Lib "USER32" () As Long Sub WindowUpdating(Enabled As Boolean) 'Completely Locks the Whole Application Screen Area, 'including dialogs and the mouse. Dim Res As Long If Enabled Then LockWindowUpdate 0 'Unlock screen area Else Res = LockWindowUpdate(GetDesktopWindow) 'Lock at desktop level End If End Sub Sub Test() WindowUpdating False Application.Wait Now + TimeValue("00:00:05") WindowUpdating True End Sub (Stolen from Dave Peterson, who might have stolen it from Laurent Longre :-)). Regards, Vasant "Otto Moehrbach" wrote in message ... Excel 2002, WinXP I have some code that opens another file, checks it for various criteria, and closes that file. I have that code bracketed with the ScreenUpdating False/True statements. All this works just fine, except that the task bar at the bottom of the screen jumps during this process of opening/closing of this other file. Is there a way to "freeze" or otherwise prevent the task bar from jumping during this section of my code? My user says that the title bar at the top of the Excel window also jumps, so the same question applies to that. Thanks for your help. Otto |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Task Bar & Windows Title changes
Vasant
Thanks for that and thanks for the warning. I'll pass it on to my user, warning and all. Otto "Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message ... Hi Otto: Try this at your own risk: Private Declare Function LockWindowUpdate Lib "USER32" _ (ByVal hwndLock As Long) As Long Private Declare Function GetDesktopWindow Lib "USER32" () As Long Sub WindowUpdating(Enabled As Boolean) 'Completely Locks the Whole Application Screen Area, 'including dialogs and the mouse. Dim Res As Long If Enabled Then LockWindowUpdate 0 'Unlock screen area Else Res = LockWindowUpdate(GetDesktopWindow) 'Lock at desktop level End If End Sub Sub Test() WindowUpdating False Application.Wait Now + TimeValue("00:00:05") WindowUpdating True End Sub (Stolen from Dave Peterson, who might have stolen it from Laurent Longre :-)). Regards, Vasant "Otto Moehrbach" wrote in message ... Excel 2002, WinXP I have some code that opens another file, checks it for various criteria, and closes that file. I have that code bracketed with the ScreenUpdating False/True statements. All this works just fine, except that the task bar at the bottom of the screen jumps during this process of opening/closing of this other file. Is there a way to "freeze" or otherwise prevent the task bar from jumping during this section of my code? My user says that the title bar at the top of the Excel window also jumps, so the same question applies to that. Thanks for your help. Otto |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Windows in task bar in MS EXCEL 2007 | New Users to Excel | |||
Windows in Task bar in 2007 | Excel Discussion (Misc queries) | |||
Problem with Windows in Task Bar command | Excel Discussion (Misc queries) | |||
On the Task Bar, can I display the workbook title when minimized . | Setting up and Configuration of Excel | |||
Checking for a Task on windows? | Excel Programming |