Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Screen flashing | Excel Discussion (Misc queries) | |||
How to stop the screen from 'flashing' when copying and pasting | Excel Discussion (Misc queries) | |||
Screen flashing why? | Excel Discussion (Misc queries) | |||
flashing screen | Excel Programming | |||
flashing screen driving me bonkers! | Excel Programming |