LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Top Spin
 
Posts: n/a
Default Macro suddenly causes the screen to blink

On Thu, 25 Nov 2004 10:43:14 -0800, Gord Dibben <gorddibbATshawDOTca
wrote:

Top

Application.ScreenUpdating = False

'your code that moves things

Application.ScreenUpdating = True


That made a huge difference -- thanks.

Also note that "selecting" things(which causes the flashing around)is usually
not necessary.

Range(Range("A1"), Range("A1").End(xlDown)).Select
Selection.Copy
Sheets("Sheet2").Select
Range("A1").Select
Selection.Paste

is equal to.....

Range(Range("A1"), Range("A1").End(xlDown)).Copy _
Destination:=Sheets("Sheet2").Range("A1")

and will not cause flashing because no ranges or sheets are actually selected.


I don't understand this syntax and cannot find it in the help. Is this
a command? a property? ???

What is the ":=" syntax? Is it documented anywhere?

Here is a snippet of code. It's a loop to reset the color and bold
attributes of a bunch of cells and to examine the values. Is there a
way to do this without selecting the cells?

Thanks



For iRow = iRowPC1 To iRowPC2 'Loop through all cells
Range(sColTlyLet & iRow).Select 'Position at next tally cell
With ActiveCell
.Font.ColorIndex = iColorAuto 'Reset it to black
.Font.Bold = False '.& make it unbold
End With
Range(sColSumLet & iRow).Select 'Position at next sum cell
With ActiveCell
.Font.ColorIndex = iColorAuto 'Reset it to black
.Font.Bold = False '.& make it unbold
nSum(iRow) = .Value 'Save the value for comparison
End With
Range(sColPCDLet & iRow).Select 'Position at % next cell
With ActiveCell
.Font.ColorIndex = iColorAuto 'Reset it to black
.Font.Bold = False '.& make it unbold
nPCD(iRow) = .Value 'Save the value for comparison
Next iRow


--
Email: Usenet-20031220 at spamex.com
(11/09/04)
 
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
Macro does not run when data refreshed Larry Lehman Excel Discussion (Misc queries) 0 January 16th 05 07:31 PM
Record Macro Relative does not work? lbbss Excel Discussion (Misc queries) 3 December 13th 04 08:43 PM
Record Macro Relative does not work? lbbss Excel Discussion (Misc queries) 1 December 13th 04 07:55 PM
excel macro inconsistency JM Excel Discussion (Misc queries) 2 December 9th 04 01:13 AM
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 04:46 PM


All times are GMT +1. The time now is 05:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"