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: 49
Default SheetCalculate fires all the time

Hi all

I have this sheet, with a BOM to order, but it hides certain items.
Then for sorting, I need to hide those items again. I do that by the
last unlabeled coloums, which is X for hide.
So, when calculating, it will hide that.
It worked well until the new 2007 version of Excel - it seems to fire
every second or so :)
So it flickets all the time.

My code is this, and it fires, then relaxed for a second or so, then
fires again.

Any ideas how I can avoid that?

WBR
Sonnich

Private Sub Workbook_SheetCalculate(ByVal Sh As Object)
Dim iHidden, iRow As Integer
Dim ws As Worksheet

If Worksheets("BOM").Cells(1, 28).Value = "" Then
Worksheets("BOM").Cells(1, 28).Value = "X" ' marked that we are
working

Application.ScreenUpdating = False
Application.DisplayAlerts = False

With Worksheets("BOM")
' find plase to store hidden data
iHidden = 1
While .Cells(6, iHidden).Text < ""
iHidden = iHidden + 1
Wend

iRow = 7
While .Cells(iRow, 1).Value < ""
If .Cells(iRow, iHidden).Value < "" Then
.Rows(iRow).Hidden = True
End If
iRow = iRow + 1
Wend
End With

Application.ScreenUpdating = True
Application.DisplayAlerts = True

Worksheets("BOM").Cells(1, 28).Value = "" ' free this function
End If
End Sub
 
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
SheetCalculate Event pwz[_2_] Excel Programming 2 July 23rd 08 05:46 PM
SetLinkOnData only fires once? [email protected] Excel Programming 0 December 3rd 07 03:08 PM
Which Fires First? okrob Excel Programming 4 February 22nd 07 07:11 PM
SheetCalculate (F9) does not reach the excel-addin kikde Excel Programming 6 February 14th 06 04:11 PM
Problem with SheetCalculate Event Jim Rech Excel Programming 3 November 6th 03 02:08 PM


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