ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Screen Flicker when changing row height (https://www.excelbanter.com/excel-programming/294444-screen-flicker-when-changing-row-height.html)

Ian Webster

Screen Flicker when changing row height
 
I have a simple routine that uses a spin button to resize several rows
from a height of 2 to 12.75.

Sub Row_Height_Change()
Application.ScreenUpdating = False
UnProtectAllSheets
Sheets("Re-Issue Input Form").Select
If Sheets("Re-Issue Input Form").Range("Event_2_Row_Height").Value
= 1 Then
Range("13:18,26:31,39:44").Select
Selection.RowHeight = 12.75
Else
Range("13:18,26:31,39:44").Select
Selection.RowHeight = 2
End If
Application.ScreenUpdating = True
ProtectAllSheets
End Sub

I have turned the screen updating off but I still get a annoying
screen flicker. Does anyone know how I can eliminate this?

Thanks in advance for any answers.

Tom Ogilvy

Screen Flicker when changing row height
 
You have changed what is on the screen - so you can expect that their will
be visible feedback based on this change. I don't know what your unprotect
and protect code does, but running your code with changes made to the
activesheet, produced very little visible evidence except the changes that
the code made to the row height.

--
Regards,
Tom Ogilvy


"Ian Webster" wrote in message
om...
I have a simple routine that uses a spin button to resize several rows
from a height of 2 to 12.75.

Sub Row_Height_Change()
Application.ScreenUpdating = False
UnProtectAllSheets
Sheets("Re-Issue Input Form").Select
If Sheets("Re-Issue Input Form").Range("Event_2_Row_Height").Value
= 1 Then
Range("13:18,26:31,39:44").Select
Selection.RowHeight = 12.75
Else
Range("13:18,26:31,39:44").Select
Selection.RowHeight = 2
End If
Application.ScreenUpdating = True
ProtectAllSheets
End Sub

I have turned the screen updating off but I still get a annoying
screen flicker. Does anyone know how I can eliminate this?

Thanks in advance for any answers.




Jim Cone

Screen Flicker when changing row height
 
Ian,

Not selecting the rows will help.

Change:
Range("13:18,26:31,39:44").Select
Selection.RowHeight = 12.75 'or 2

To:
Range("13:18,26:31,39:44").RowHeight = 12.75 'or 2

Regards,
Jim Cone
San Francisco, CA

"Ian Webster" wrote in message om...
I have a simple routine that uses a spin button to resize several rows
from a height of 2 to 12.75.
Sub Row_Height_Change()
Application.ScreenUpdating = False
UnProtectAllSheets
Sheets("Re-Issue Input Form").Select
If Sheets("Re-Issue Input Form").Range("Event_2_Row_Height").Value
= 1 Then
Range("13:18,26:31,39:44").Select
Selection.RowHeight = 12.75
Else
Range("13:18,26:31,39:44").Select
Selection.RowHeight = 2
End If
Application.ScreenUpdating = True
ProtectAllSheets
End Sub
I have turned the screen updating off but I still get a annoying
screen flicker. Does anyone know how I can eliminate this?
Thanks in advance for any answers.



All times are GMT +1. The time now is 11:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com