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: 110
Default Workbook locks up after Worksheet_Change operation

Column "D" is subtracted from "E" the previous total and simulaneously "F" is
added to the mix whenever columns "D,E or F is changed.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim oTarget As Range
Dim oIntersect As Range
Set oTarget = Range("D1:F100")
Set oIntersect = Application.Intersect(oTarget, Target)
If Not oIntersect Is Nothing Then
With Sheets("Sheet1")
For n = 2 To 100
.Cells(n, 5) = .Cells((n - 1), 5) + .Cells(n, 6) - .Cells(n,
4)
Next n
End With
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
Shared 2007 Workbook, 3MB, 15 users, locks up after 2-3 hours of u Jean-Luc Excel Discussion (Misc queries) 0 February 17th 10 02:29 PM
Using Worksheet_change module in protected workbook. JDaywalt Excel Programming 3 December 4th 07 07:31 PM
Change cut/paste operation to cut/insert operation Don Guillett Excel Programming 0 January 17th 07 03:23 PM
Importing External Data Locks Source Workbook Pablo Excel Programming 3 February 9th 06 07:41 AM
Worksheet_Change macro locks up Excel JG Scott Excel Programming 3 November 18th 05 08:06 PM


All times are GMT +1. The time now is 09:35 AM.

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"