Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 201
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 201
Default 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
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
Windows in task bar in MS EXCEL 2007 Subramanya New Users to Excel 1 January 26th 10 05:41 PM
Windows in Task bar in 2007 Amit Kumar Baidyaka Excel Discussion (Misc queries) 1 April 3rd 09 06:14 PM
Problem with Windows in Task Bar command Jim Excel Discussion (Misc queries) 1 March 10th 06 06:13 PM
On the Task Bar, can I display the workbook title when minimized . Gerry_gas Setting up and Configuration of Excel 2 February 17th 05 10:03 PM
Checking for a Task on windows? NooK[_6_] Excel Programming 8 June 23rd 04 02:53 PM


All times are GMT +1. The time now is 09:34 PM.

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

About Us

"It's about Microsoft Excel"