Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 127
Default How to update a control without screen flashing

Excel 2003. I have a workbook I call "Switchboard" with multiple sheets. On
each sheet I have some controls, one of which is a text window that I use to
display the status of a program that is running as a result of pressing a
control button on the sheet. The code that is running does open some other
workbooks temporarily, but focus is retained by the "Switchboard" workbook.
However, when I try to update the status text control using the following
code, the other open workbooks flash up momentarily and then focus is
returned to the Switchboard workbook and sheet. How may I eliminate this
"flash"? Here's the code:

Public Sub UpdateStatus(UStatus As String)
Dim SUOff As Boolean
If Application.ScreenUpdating = False Then
SUOff = True
Application.ScreenUpdating = True
End If
ThisWorkbook.ActiveSheet.ProcessStatus.Value = UStatus
ThisWorkbook.ActiveSheet.ProcessStatus.Activate
If SUOff Then Application.ScreenUpdating = False
End Sub

The call would be "Call UpdateStatus("Processing workbook x")"
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to update a control without screen flashing

IF the screen haschanged while updating is off and you turn it on, then
there is no way to avoid having the information in the screen updated which
I assume you are describing as a flash. As a general suggestion, I would
avoid selecting and activating things. Have your status window fill the
screen and only update when it is in the foreground.

--
Regards,
Tom Ogilvy



"Chaplain Doug" wrote in message
...
Excel 2003. I have a workbook I call "Switchboard" with multiple sheets.

On
each sheet I have some controls, one of which is a text window that I use

to
display the status of a program that is running as a result of pressing a
control button on the sheet. The code that is running does open some

other
workbooks temporarily, but focus is retained by the "Switchboard"

workbook.
However, when I try to update the status text control using the following
code, the other open workbooks flash up momentarily and then focus is
returned to the Switchboard workbook and sheet. How may I eliminate this
"flash"? Here's the code:

Public Sub UpdateStatus(UStatus As String)
Dim SUOff As Boolean
If Application.ScreenUpdating = False Then
SUOff = True
Application.ScreenUpdating = True
End If
ThisWorkbook.ActiveSheet.ProcessStatus.Value = UStatus
ThisWorkbook.ActiveSheet.ProcessStatus.Activate
If SUOff Then Application.ScreenUpdating = False
End Sub

The call would be "Call UpdateStatus("Processing workbook x")"
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 127
Default How to update a control without screen flashing

Tom:

Is there a way to ensure that my workbook maintains the focus at all times,
even though the code may open some other workbooks (which I do not want to
see)?

"Tom Ogilvy" wrote:

IF the screen haschanged while updating is off and you turn it on, then
there is no way to avoid having the information in the screen updated which
I assume you are describing as a flash. As a general suggestion, I would
avoid selecting and activating things. Have your status window fill the
screen and only update when it is in the foreground.

--
Regards,
Tom Ogilvy



"Chaplain Doug" wrote in message
...
Excel 2003. I have a workbook I call "Switchboard" with multiple sheets.

On
each sheet I have some controls, one of which is a text window that I use

to
display the status of a program that is running as a result of pressing a
control button on the sheet. The code that is running does open some

other
workbooks temporarily, but focus is retained by the "Switchboard"

workbook.
However, when I try to update the status text control using the following
code, the other open workbooks flash up momentarily and then focus is
returned to the Switchboard workbook and sheet. How may I eliminate this
"flash"? Here's the code:

Public Sub UpdateStatus(UStatus As String)
Dim SUOff As Boolean
If Application.ScreenUpdating = False Then
SUOff = True
Application.ScreenUpdating = True
End If
ThisWorkbook.ActiveSheet.ProcessStatus.Value = UStatus
ThisWorkbook.ActiveSheet.ProcessStatus.Activate
If SUOff Then Application.ScreenUpdating = False
End Sub

The call would be "Call UpdateStatus("Processing workbook x")"
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 127
Default How to update a control without screen flashing

Thanks Walt. Will try and report.

"Walt" wrote:

Hi Doug,

You might be able to work the following into your code just after opening
the files that you don't want to flash and while screenupdating is off:

ActiveWindow.Visible = False

Best Regards,
Walt Weber

"Chaplain Doug" wrote:

Excel 2003. I have a workbook I call "Switchboard" with multiple sheets. On
each sheet I have some controls, one of which is a text window that I use to
display the status of a program that is running as a result of pressing a
control button on the sheet. The code that is running does open some other
workbooks temporarily, but focus is retained by the "Switchboard" workbook.
However, when I try to update the status text control using the following
code, the other open workbooks flash up momentarily and then focus is
returned to the Switchboard workbook and sheet. How may I eliminate this
"flash"? Here's the code:

Public Sub UpdateStatus(UStatus As String)
Dim SUOff As Boolean
If Application.ScreenUpdating = False Then
SUOff = True
Application.ScreenUpdating = True
End If
ThisWorkbook.ActiveSheet.ProcessStatus.Value = UStatus
ThisWorkbook.ActiveSheet.ProcessStatus.Activate
If SUOff Then Application.ScreenUpdating = False
End Sub

The call would be "Call UpdateStatus("Processing workbook x")"
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default How to update a control without screen flashing

Hi Doug,

You might be able to work the following into your code just after opening
the files that you don't want to flash and while screenupdating is off:

ActiveWindow.Visible = False

Best Regards,
Walt Weber

"Chaplain Doug" wrote:

Excel 2003. I have a workbook I call "Switchboard" with multiple sheets. On
each sheet I have some controls, one of which is a text window that I use to
display the status of a program that is running as a result of pressing a
control button on the sheet. The code that is running does open some other
workbooks temporarily, but focus is retained by the "Switchboard" workbook.
However, when I try to update the status text control using the following
code, the other open workbooks flash up momentarily and then focus is
returned to the Switchboard workbook and sheet. How may I eliminate this
"flash"? Here's the code:

Public Sub UpdateStatus(UStatus As String)
Dim SUOff As Boolean
If Application.ScreenUpdating = False Then
SUOff = True
Application.ScreenUpdating = True
End If
ThisWorkbook.ActiveSheet.ProcessStatus.Value = UStatus
ThisWorkbook.ActiveSheet.ProcessStatus.Activate
If SUOff Then Application.ScreenUpdating = False
End Sub

The call would be "Call UpdateStatus("Processing workbook x")"
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org

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
Screen flashing teepee[_3_] Excel Discussion (Misc queries) 0 November 26th 08 12:20 AM
How to stop the screen from 'flashing' when copying and pasting BaggieDan Excel Discussion (Misc queries) 4 October 9th 08 10:31 PM
Screen flashing why? Chet Excel Discussion (Misc queries) 1 May 16th 06 08:25 PM
flashing screen Paul Excel Programming 2 March 9th 05 01:59 PM
flashing screen driving me bonkers! Deb Lang Excel Programming 1 October 30th 03 04:50 PM


All times are GMT +1. The time now is 12:20 AM.

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"