Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Strange problem with Code

I have this code on a sheet.

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("E2:F3003")) Is Nothing Then
Exit Sub
Else
Sheets("Main").Range("G2:M3003").Calculate
Sheets("Main").Range("Q2:Q3003").Calculate
End If
End Sub

The reason I have this code is I have three columns of large array formulae
at the end of my sheet and keeping the book on auto calc is very slow. The
two ranges I am calculating are conditionally formatted to "black out"
depending on the entry of columns E and F. Everything works fine except the
conditional formatting, that is to say the "blacking out" isn't instant. I
have to scroll up and then back down to see the "blacking out" has taken
effect.
Am I missing something, some sort of refresh screen function? I have never
had this problem before. Can anyone help?


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Strange problem with Code

Found the answer to this question, thought I post just in case nyone else if
having the same problem.
The screen updating command solves the problem.
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("E2:F3003")) Is Nothing Then
Exit Sub
Else
Application.ScreenUpdating = True
Sheets("Main").Range("G2:M3003").Calculate
Sheets("Main").Range("Q2:Q3003").Calculate
End If
End Sub
"PH NEWS" wrote in message
...
I have this code on a sheet.

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("E2:F3003")) Is Nothing Then
Exit Sub
Else
Sheets("Main").Range("G2:M3003").Calculate
Sheets("Main").Range("Q2:Q3003").Calculate
End If
End Sub

The reason I have this code is I have three columns of large array

formulae
at the end of my sheet and keeping the book on auto calc is very slow. The
two ranges I am calculating are conditionally formatted to "black out"
depending on the entry of columns E and F. Everything works fine except

the
conditional formatting, that is to say the "blacking out" isn't instant. I
have to scroll up and then back down to see the "blacking out" has taken
effect.
Am I missing something, some sort of refresh screen function? I have never
had this problem before. Can anyone help?




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
Strange Data Look Up Problem redstang423 Excel Worksheet Functions 1 August 10th 06 02:03 PM
Strange problem with a combobox and ListFillRange teddyk Excel Discussion (Misc queries) 1 August 7th 06 09:16 PM
UDF problem in converting data into code 128 B Safi Excel Worksheet Functions 0 July 30th 06 08:57 AM
Strange Excel Problem RodShaw2 Setting up and Configuration of Excel 2 July 5th 05 02:19 PM
Strange Excel problem RodShaw2 Setting up and Configuration of Excel 2 July 5th 05 02:04 PM


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