View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Workbook locks up after Worksheet_Change operation

You can change cells on the same worksheet, different worksheets, worksheets in
different workbooks. Heck, you can open a workbook (or create a new workbook)
and do whatever you like.

If you don't want the worksheet_change event to fire when you change a cell on
the same sheet, you can turn off events...

application.enableevents = false
me.range("A1").value = "something you want"
application.enableevents = true



joel wrote:

first the workshet change must of been in the correct location for the
workbook to lock up on you origianlly. Second a worksheet change isn't
meant to change cells other than the target cell. Excel doesn't like
when you change other locatiions than the target. I doesn't allow you
to change cells in other sheets and only sometimes lets you change cells
on the same sheet.

I don't know why you just don't use a formula on the worksheet

Cells(n, 5) = .Cells((n - 1), 5) + .Cells(n, 6) - .Cells(n,4)

Put the following formula in cell E2

=E1+F2-D4

Then copy cell E2 to cells E3 to E100.

--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=173413

Microsoft Office Help


--

Dave Peterson