Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Remove screen 'flicker' on executing code


I have a worksheet that displays lines of cashflows by type of cash
flow

On worksheet activation, the sheet resets and updates the input and
then removes any blank rows for better presentation and print output.
Am using the following code in the worksheet (not elegant but it works
- I'm very new to VBA -first project). While this works, there is
significant 'flicker' on the screen while the worksheet goes about its
business.

Is there a way to accomplish the same without having to endure the
flicker e.g. could i set up a 'beforeclose' routine in another sheet &
if so, would appreciate a few pointers on how to go about doing this.

Any help much appreciated
Here's the code I'm using


Public Sub worksheet_activate()
Sheet2.Button102_Click
Password = "djdog"
ActiveSheet.Unprotect Password
Dim tableEnd As Double
Dim m As Double

' tableEnd is set to the last row in the spreadsheet.
' work backwards from the last row upwards and hide the row if it is
empty.

tableEnd = Range("a7:k111").SpecialCells(xlCellTypeLastCell). Row
For m = tableEnd To 1 Step -1
If RowIsEmpty(m) Then Cells(m, 1).EntireRow.Hidden = True
Next m

Password = "djdog"
ActiveSheet.Protect Password, True, True, True

End Sub

Public Sub Button102_Click()

Password = "djdog"
ActiveSheet.Unprotect Password
Cells.Select
Selection.EntireRow.Hidden = False
Range("A1").Select
Password = "djdog"
ActiveSheet.Protect Password, True, True, True
End Sub

Cheers

Peter


--
peter.thompson
------------------------------------------------------------------------
peter.thompson's Profile: http://www.excelforum.com/member.php...o&userid=29686
View this thread: http://www.excelforum.com/showthread...hreadid=498942

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Remove screen 'flicker' on executing code

"peter.thompson"
<peter.thompson.2198ly_1136620801.2528@excelforu m-nospam.com wrote in
message news:peter.thompson.2198ly_1136620801.2528@excelfo rum-nospam.com...

I have a worksheet that displays lines of cashflows by type of cash
flow

On worksheet activation, the sheet resets and updates the input and
then removes any blank rows for better presentation and print output.
Am using the following code in the worksheet (not elegant but it works
- I'm very new to VBA -first project). While this works, there is
significant 'flicker' on the screen while the worksheet goes about its
business.

Is there a way to accomplish the same without having to endure the
flicker e.g. could i set up a 'beforeclose' routine in another sheet &
if so, would appreciate a few pointers on how to go about doing this.

Any help much appreciated
Here's the code I'm using


Public Sub worksheet_activate()
Sheet2.Button102_Click
Password = "djdog"
ActiveSheet.Unprotect Password
Dim tableEnd As Double
Dim m As Double

' tableEnd is set to the last row in the spreadsheet.
' work backwards from the last row upwards and hide the row if it is
empty.

tableEnd = Range("a7:k111").SpecialCells(xlCellTypeLastCell). Row
For m = tableEnd To 1 Step -1
If RowIsEmpty(m) Then Cells(m, 1).EntireRow.Hidden = True
Next m

Password = "djdog"
ActiveSheet.Protect Password, True, True, True

End Sub

Public Sub Button102_Click()

Password = "djdog"
ActiveSheet.Unprotect Password
Cells.Select
Selection.EntireRow.Hidden = False
Range("A1").Select
Password = "djdog"
ActiveSheet.Protect Password, True, True, True
End Sub

Cheers

Peter


--
peter.thompson
------------------------------------------------------------------------
peter.thompson's Profile:
http://www.excelforum.com/member.php...o&userid=29686
View this thread: http://www.excelforum.com/showthread...hreadid=498942


try adding this to the top of your macro

Application.ScreenUpdating = False


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 Flicker dim Excel Discussion (Misc queries) 4 November 28th 07 09:42 PM
List box screen flicker [email protected] Excel Discussion (Misc queries) 0 September 25th 07 02:37 PM
screen flicker mark kubicki Excel Programming 2 March 22nd 05 12:03 AM
Screen flicker despite ScreenUpdate = False in the first line of code Gunnar Johansson Excel Programming 6 September 3rd 04 02:05 PM
Screen Flicker JonWayn Excel Programming 1 November 1st 03 11:34 PM


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