LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 161
Default Screen Flashing

I have the following code when a worksheet is started and the exited:

Private Sub Worksheet_Activate()
Dim cst As String
Dim xcell As Range
Dim ycell As Range

unprotectsheet
stopautocalc
cst = Sheets("Databases").Range("currentcost")
Set xcell = Range(cst & "tlr")
Set ycell = Range(cst & "brr").Offset(4, 2)
Range(xcell, ycell).Select
Selection.EntireRow.Hidden = False
HideAroundSelection
Application.Goto Reference:=Worksheets("Cost Summary").Range("A1"), _
Scroll:=True
Range("a1").Select
startautocalc
protectsheet

End Sub

Private Sub Worksheet_Deactivate()
Unprotect
stopautocalc
Range("A:A").EntireRow.Hidden = False
startautocalc
protectsheet
End Sub

Sub stopautocalc()
With Application
.ScreenUpdating = False
.EnableEvents = False
.Calculation = xlCalculationManual
End With
End Sub

Sub startautocalc()
With Application
.ScreenUpdating = True
.EnableEvents = True
.Calculation = xlCalculationAutomatic
End With
End Sub

I would like to make it so that the screen doesn't flash when it was started
and exited. I thought the 'stopautocalc' would work, but it doesn't. Any
ideas on how to stop it from flashing?
Thanks

 
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
Screen Flashing Mike H. Excel Programming 2 June 27th 07 10:44 PM
Eliminate Screen Flashing Josh Sale Excel Programming 4 August 2nd 06 11:30 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


All times are GMT +1. The time now is 01:13 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"