-
The basic code is OK, but you need to prevent the code from looping; changing X11 triggers the code
Try
[VBA]Private Sub Worksheet_Change(ByVal target As Range)
On Error GoTo Exits
Application.EnableEvents = False
Select Case target.Address(False, False)
Case "W11"
Range("Y11").Value = 8
Case "R11"
MsgBox "It's not working!"
Range("X11").Value = 4
'Intersect(target.EntireRow, Cells(11, "X")).Value = 4
'target.Offset(0, 6)=4
End Select
Exits:
Application.EnableEvents = True
End Sub
[/VBA]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules