View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
eggpap[_2_] eggpap[_2_] is offline
external usenet poster
 
Posts: 1
Default Worksheet_change event


Hello,

I have a workbook (let's call it "MyWb") with many udf and sheets in
it.
To simplify the issue suppose I have the following code in
Worksheet_change event of Sheet1:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 7
target.offset(1)="x"
end if
End Sub

or: when a cell of 7th row changes its value, valorize the
corresponding
column cell on the 8th row with the value "x"

This code performs correctly on an empty wb. On MyWB project, instead,
nothing happens, the offset(1) cell is not valorized and no error is
claimed.
I have debugged with two breakpoints placed on the third and fourth
statement on the sample snippet. The program stops correctly on the
first bp. Then, if I press F8 to do another step, the program stops
internally to one udf, the, if I press F5 to complete the run, the
program ignores the second bp and I get nothing.

Thanks,
Emiliano
Excel 2003 on Vista HP
VBA knowing


--
eggpap
------------------------------------------------------------------------
eggpap's Profile: http://www.thecodecage.com/forumz/member.php?userid=90
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=48998