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: 76
Default Code with formula interfering in worksheet change event

Hello,
When this code is in the worksheet change event, it restricts the
function of other code in worksheet change. Why? Is it about the
placement of the Exit Sub? All this code does is carries formulas in
columns 3 and 10 down to new rows when inserted manually.

If Intersect(Target, Me.Range("A:A")) Is Nothing Then Exit Sub
On Error Goto CleanUp:
With Target
If .Value < "" Then
Application.EnableEvents = False
.Offset(0, 3).FormulaR1C1 = "=RC[-1]=R2C3"
.Offset(0, 10).FormulaR1C1 = "=RC[-1]=R2C10"
.Offset(0, 2).FormulaR1C1 = "=if(rc[-2]<"""",rc[-1],"""")"
.Offset(0, 9).FormulaR1C1 =
"=if(rc[-8]<0,if(rc[-7]<rc[-8],rc[-9]&"",
""&left(rc[-7],2),rc[-9]&"", ""&left(rc[-8],1)),"""")"
End If
End With
CleanUp:
Application.EnableEvents = True

Also, could you help me with syntax for another vb formula that
essentially is this:
=OFFSET(Column10sHeading,0,246)
which just sets the last column equal to column 10.

Thanks greatly,
Eric

 
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
Cell value change to trigger macro (worksheet change event?) Neil Goldwasser Excel Programming 4 January 10th 06 01:55 PM
Change Cell from Validated List Not Firing Worksheet Change Event [email protected] Excel Programming 3 October 4th 04 03:00 AM
Enable/Disable Worksheet Change Event code Stuart[_5_] Excel Programming 2 November 3rd 03 07:22 PM
Copy Sheets minus Worksheet Change Event code & Macro Buttons Bob[_36_] Excel Programming 0 October 8th 03 01:17 AM


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